home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ASMWIZ14.ZIP / ASMWIZ.MAN < prev    next >
Text File  |  1990-03-29  |  119KB  |  4,259 lines

  1. Service : BC_ASC2INT
  2.  
  3. Module  : Base Conversion Services
  4.  
  5. Compat  : Any
  6.  
  7. Purpose : Converts an ASCIIZ string to an unsigned integer
  8.  
  9. Parms:
  10.       BL <-- base from which to convert (2-36)
  11.    DS:SI <-- pointer to string
  12.    -------
  13.       AX = unsigned integer (0-65,535)
  14.  
  15. Description:
  16.  
  17. The BC_ASC2INT service converts an ASCIIZ string to an unsigned integer
  18. value.  The conversion stops at the first character which cannot be construed
  19. as being part of the number.
  20.  
  21. Any reasonable base may be specified, giving this service considerable
  22. flexibility.  More commonly-used bases include:
  23.  
  24.      2     binary
  25.      8     octal
  26.     10     decimal
  27.     16     hex
  28.  
  29.  
  30.  
  31.  
  32. Service : BC_ASC2LONG
  33.  
  34. Module  : Base Conversion Services
  35.  
  36. Compat  : Any
  37.  
  38. Purpose : Converts an ASCIIZ string to an unsigned long integer
  39.  
  40. Parms:
  41.       BL <-- base from which to convert (2-36)
  42.    DS:SI <-- pointer to string
  43.    -------
  44.    DX,AX = unsigned long integer (0-4,294,967,295)
  45.  
  46. Description:
  47.  
  48. The BC_ASC2LONG service converts an ASCIIZ string to an unsigned long integer
  49. value.  The conversion stops at the first character which cannot be construed
  50. as being part of the number.
  51.  
  52. Any reasonable base may be specified, giving this service considerable
  53. flexibility.  More commonly-used bases include:
  54.  
  55.      2     binary
  56.      8     octal
  57.     10     decimal
  58.     16     hex
  59.  
  60. Service : BC_ASC2SINT
  61.  
  62. Module  : Base Conversion Services
  63.  
  64. Compat  : Any
  65.  
  66. Purpose : Converts an ASCIIZ string to a signed integer
  67.  
  68. Parms:
  69.       BL <-- base from which to convert (2-36)
  70.    DS:SI <-- pointer to string
  71.    -------
  72.       AX = unsigned integer (-32768 to 32767)
  73.  
  74. Description:
  75.  
  76. The BC_ASC2SINT service converts an ASCIIZ string to a signed integer value.
  77. The conversion stops at the first character which cannot be construed as
  78. being part of the number.
  79.  
  80. Any reasonable base may be specified, giving this service considerable
  81. flexibility.  More commonly-used bases include:
  82.  
  83.      2     binary
  84.      8     octal
  85.     10     decimal
  86.     16     hex
  87.  
  88. Note that negative numbers are frequently represented as unsigned numbers
  89. when a base other than 10 (decimal) is used.  If you wish to follow that
  90. convention, simply use BC_ASC2INT instead of this routine.
  91.  
  92. Service : BC_ASC2SLONG
  93.  
  94. Module  : Base Conversion Services
  95.  
  96. Compat  : Any
  97.  
  98. Purpose : Converts an ASCIIZ string to a signed long integer
  99.  
  100. Parms:
  101.       BL <-- base from which to convert (2-36)
  102.    DS:SI <-- pointer to string
  103.    -------
  104.    DX,AX = signed long integer (-2,147,483,648 to 2,147,483,647)
  105.  
  106. Description:
  107.  
  108. The BC_ASC2SLONG service converts an ASCIIZ string to a signed long integer
  109. value.  The conversion stops at the first character which cannot be construed
  110. as being part of the number.
  111.  
  112. Any reasonable base may be specified, giving this service considerable
  113. flexibility.  More commonly-used bases include:
  114.  
  115.      2     binary
  116.      8     octal
  117.     10     decimal
  118.     16     hex
  119.  
  120. Note that negative numbers are frequently represented as unsigned numbers
  121. when a base other than 10 (decimal) is used.  If you wish to follow that
  122. convention, simply use BC_ASC2LONG instead of this routine.
  123.  
  124. Service : BC_INT2ASC
  125.  
  126. Module  : Base Conversion Services
  127.  
  128. Compat  : Any
  129.  
  130. Purpose : Converts an unsigned integer to an ASCIIZ string
  131.  
  132. Parms:
  133.       AX <-- unsigned integer (0-65,535)
  134.       BL <-- desired base (2-36)
  135.    ES:DI <-- pointer to string buffer (recommend 17 bytes)
  136.  
  137. Description:
  138.  
  139. The BC_INT2ASC service converts an integer value to an ASCIIZ number of a
  140. specified base.  The integer is presumed to be unsigned, giving a range of
  141. 0-65,535.
  142.  
  143. More commonly-used bases include:
  144.  
  145.      2     binary
  146.      8     octal
  147.     10     decimal
  148.     16     hex
  149.  
  150.  
  151.  
  152.  
  153. Service : BC_LONG2ASC
  154.  
  155. Module  : Base Conversion Services
  156.  
  157. Compat  : Any
  158.  
  159. Purpose : Converts an unsigned long integer to an ASCIIZ string
  160.  
  161. Parms:
  162.    DX,AX <-- unsigned long integer (0-4,294,967,295)
  163.       BL <-- desired base (2-36)
  164.    ES:DI <-- pointer to string buffer (recommend 33 bytes)
  165.  
  166. Description:
  167.  
  168. The BC_LONG2ASC service converts an unsigned long integer value to an ASCIIZ
  169. number of a specified base.
  170.  
  171. More commonly-used bases include:
  172.  
  173.      2     binary
  174.      8     octal
  175.     10     decimal
  176.     16     hex
  177.  
  178. Service : BC_SINT2ASC
  179.  
  180. Module  : Base Conversion Services
  181.  
  182. Compat  : Any
  183.  
  184. Purpose : Converts a signed integer to an ASCIIZ string
  185.  
  186. Parms:
  187.       AX <-- signed integer (-32768 to 32767)
  188.       BL <-- desired base (2-36)
  189.    ES:DI <-- pointer to string buffer (recommend 18 bytes)
  190.  
  191. Description:
  192.  
  193. The BC_SINT2ASC service converts an integer value to an ASCIIZ number of a
  194. specified base.  The integer is presumed to be signed, giving a range of
  195. -32,768 to 32,767.
  196.  
  197. More commonly-used bases include:
  198.  
  199.      2     binary
  200.      8     octal
  201.     10     decimal
  202.     16     hex
  203.  
  204. Note that negative numbers are frequently represented as unsigned numbers
  205. when a base other than 10 (decimal) is used.  If you wish to follow that
  206. convention, simply use BC_INT2ASC instead of this routine.
  207.  
  208. Service : BC_SLONG2ASC
  209.  
  210. Module  : Base Conversion Services
  211.  
  212. Compat  : Any
  213.  
  214. Purpose : Converts a signed long integer to an ASCIIZ string
  215.  
  216. Parms:
  217.    DX,AX <-- signed long integer (-2,147,483,648 to 2,147,483,647)
  218.       BL <-- desired base (2-36)
  219.    ES:DI <-- pointer to string buffer (recommend 34 bytes)
  220.  
  221. Description:
  222.  
  223. The BC_SLONG2ASC service converts a signed long integer value to an ASCIIZ
  224. number of a specified base.
  225.  
  226. More commonly-used bases include:
  227.  
  228.      2     binary
  229.      8     octal
  230.     10     decimal
  231.     16     hex
  232.  
  233. Note that negative numbers are frequently represented as unsigned numbers
  234. when a base other than 10 (decimal) is used.  If you wish to follow that
  235. convention, simply use BC_LONG2ASC instead of this routine.
  236.  
  237. Service : BV_CHROUT
  238.  
  239. Module  : BIOS Video Services
  240.  
  241. Compat  : BIOS
  242.  
  243. Purpose : Displays a character on the screen
  244.  
  245. Parms:
  246.       AL <-- character to display
  247.  
  248. Description:
  249.  
  250. The BV_CHROUT routine displays a character on the screen.
  251.  
  252. The following control codes are interpreted:
  253.    7      Bell             beep
  254.    8      Backspace        non-destructive backspace
  255.    9      Tab              space over to the next tab stop
  256.   10      Linefeed         move cursor down one line, scrolling as needed
  257.   12      Formfeed         clear screen and home cursor
  258.   13      Carriage Return  home cursor on current line
  259.  
  260. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  261. keep the output from this service in a window.
  262.  
  263.  
  264.  
  265.  
  266. Service : BV_CLEOLN
  267.  
  268. Module  : BIOS Video Services
  269.  
  270. Compat  : BIOS
  271.  
  272. Purpose : Clears to the end of the line
  273.  
  274. Parms:
  275.    none
  276.  
  277. Description:
  278.  
  279. The BV_CLEOLN service clears from the current cursor position to the end of
  280. the current screen line, inclusive.
  281.  
  282. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  283. keep the output from this service in a window.
  284.  
  285. Service : BV_CLS
  286.  
  287. Module  : BIOS Video Services
  288.  
  289. Compat  : BIOS
  290.  
  291. Purpose : Clears the screen
  292.  
  293. Parms:
  294.    none
  295.  
  296. Description:
  297.  
  298. The BV_CLS service clears the screen and homes the cursor to the upper left
  299. corner.
  300.  
  301. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  302. keep the output from this service in a window.
  303.  
  304.  
  305.  
  306.  
  307. Service : BV_COLOR
  308.  
  309. Module  : BIOS Video Services
  310.  
  311. Compat  : BIOS
  312.  
  313. Purpose : Sets the default text color
  314.  
  315. Parms:
  316.       AL <-- default color
  317.  
  318. Description:
  319.  
  320. The BV_COLOR service sets the default text color.  A color/attribute table is
  321. given in the ASMWIZ.DOC file.  In general, however, the background is in the
  322. high nybble and ranges 0-7 in text modes, 0 in graphics modes; the foreground
  323. is in the low nybble and ranges 0-7 in text modes, 0-x in graphics modes.
  324.  
  325. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  326. keep the output from this service in a window.
  327.  
  328. Service : BV_CRLF
  329.  
  330. Module  : BIOS Video Services
  331.  
  332. Compat  : BIOS
  333.  
  334. Purpose : Displays a <CR><LF> (carriage return and linefeed)
  335.  
  336. Parms:
  337.    none
  338.  
  339. Description:
  340.  
  341. The BV_CRLF routine displays a carriage return and linefeed on the screen.
  342.  
  343. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  344. keep the output from this service in a window.
  345.  
  346.  
  347.  
  348.  
  349. Service : BV_DELLINE
  350.  
  351. Module  : BIOS Video Services
  352.  
  353. Compat  : BIOS
  354.  
  355. Purpose : Deletes the current screen row
  356.  
  357. Parms:
  358.    none
  359.  
  360. Description:
  361.  
  362. The BV_DELLINE service deletes the row on which the cursor is placed.  Any
  363. rows beneath it are moved up and the bottom line of the screen is cleared to
  364. a row of spaces in the current screen colors.
  365.  
  366. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  367. keep the output from this service in a window.
  368.  
  369. Service : BV_FIXCOLOR
  370.  
  371. Module  : BIOS Video Services
  372.  
  373. Compat  : Any
  374.  
  375. Purpose : Tells the BV services whether to convert colors to monochrome
  376.  
  377. Parms:
  378.       AL <-- whether to convert to mono (0 no, 1 yes)
  379.  
  380. Description:
  381.  
  382. The BV_FIXCOLOR service tells the BIOS Video services whether to convert
  383. colors to their monochrome equivalents.  If not, the colors will remain as
  384. you originally specified.  If so, the colors will be converted to appropriate
  385. values for use on a monochrome display.
  386.  
  387. The color-to-mono translation attempts to mimic the original display as
  388. closely as possible.  It analyzes the foreground and background colors by
  389. their intensity.  The results are translated to white on black, bright white
  390. on black, or black on white.  The "blink" attribute is preserved.  If the
  391. original foreground was identical to the background (invisible characters),
  392. the result will be black on black.
  393.  
  394. See also the MI_GETSCREEN service, which allows you to automatically detect
  395. what kind of display is in use.
  396.  
  397. Service : BV_GETCOLOR
  398.  
  399. Module  : BIOS Video Services
  400.  
  401. Compat  : BIOS
  402.  
  403. Purpose : Gets the default text color
  404.  
  405. Parms:
  406.    -------
  407.       AL = default color
  408.  
  409. Description:
  410.  
  411. The BV_GETCOLOR service gets the default text color.  A color/attribute table
  412. is given in the ASMWIZ.DOC file.  In general, however, the background is in
  413. the high nybble and ranges 0-7 in text modes, 0 in graphics modes; the
  414. foreground is in the low nybble and ranges 0-7 in text modes, 0-x in graphics
  415. modes.
  416.  
  417. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  418. keep the output from this service in a window.
  419.  
  420. Service : BV_MODE
  421.  
  422. Module  : BIOS Video Services
  423.  
  424. Compat  : BIOS
  425.  
  426. Purpose : Gets the default screen mode
  427.  
  428. Parms:
  429.    -------
  430.       AL = mode
  431.  
  432. Description:
  433.  
  434. The BV_GETMODE service gets the current screen mode.  A table of screen modes
  435. is given in the ASMWIZ.DOC file.
  436.  
  437.  
  438.  
  439.  
  440. Service : BV_HIDECURSOR
  441.  
  442. Module  : BIOS Video Services
  443.  
  444. Compat  : BIOS
  445.  
  446. Purpose : Hides the cursor
  447.  
  448. Parms:
  449.    none
  450.  
  451. Description:
  452.  
  453. The BV_HIDECURSOR service hides the cursor, making it invisible.  This does
  454. not affect normal cursor operation.
  455.  
  456. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  457. keep the output from this service in a window.
  458.  
  459. Service : BV_INSLINE
  460.  
  461. Module  : BIOS Video Services
  462.  
  463. Compat  : BIOS
  464.  
  465. Purpose : Inserts a line at the current screen row
  466.  
  467. Parms:
  468.    none
  469.  
  470. Description:
  471.  
  472. The BV_INSLINE service inserts a row at the current cursor location.  Any
  473. rows beneath it are moved down and the new line screen is cleared to a row of
  474. spaces in the current screen colors.
  475.  
  476. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  477. keep the output from this service in a window.
  478.  
  479.  
  480.  
  481.  
  482. Service : BV_LOCATE
  483.  
  484. Module  : BIOS Video Services
  485.  
  486. Compat  : BIOS
  487.  
  488. Purpose : Sets the cursor position
  489.  
  490. Parms:
  491.       DH <-- row (1-25)
  492.       DL <-- column (1-40/80)
  493.  
  494. Description:
  495.  
  496. The BV_LOCATE service sets the cursor position.
  497.  
  498. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  499. keep the output from this service in a window.
  500.  
  501. Service : BV_MODE
  502.  
  503. Module  : BIOS Video Services
  504.  
  505. Compat  : BIOS
  506.  
  507. Purpose : Sets the screen mode
  508.  
  509. Parms:
  510.       AL <-- screen mode (0-7, 13-19, depending on video adapter)
  511.  
  512. Description:
  513.  
  514. The BV_MODE routine sets the screen mode.  This may be any of the following:
  515.  
  516.      Mode  Resolu.  Type  Colr  Use        Adapter(s)
  517.  
  518.        0   40x25    b&w     16  text       CGA, EGA, VGA
  519.        1   40x25    color   16  text       CGA, EGA, VGA
  520.        2   80x25    b&w     16  text       CGA, EGA, VGA
  521.  def-  3   80x25    color   16  text       CGA, EGA, VGA
  522.        4   320x200  color    4  graphics   CGA, EGA, VGA
  523.        5   320x200  b&w      4  graphics   CGA, EGA, VGA
  524.        6   640x200  color    2  graphics   CGA, EGA, VGA
  525.  mda-  7   80x25    b&w      -  text       MDA, EGA, VGA
  526.       13   320x200  color   16  graphics   EGA, VGA
  527.       14   640x200  color   16  graphics   EGA, VGA
  528.       15   640x350  mono     -  graphics   EGA, VGA
  529.       16   640x350  color   16  graphics   EGA, VGA
  530.       17   640x480  color    2  graphics   VGA
  531.       18   640x480  color   16  graphics   VGA
  532.       19   320x200  color  256  graphics   VGA
  533.  
  534. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  535. keep the output from this service in a window.
  536.  
  537. Service : BV_POPUP
  538.  
  539. Module  : BIOS Video Services
  540.  
  541. Compat  : BIOS
  542.  
  543. Purpose : Displays a pop-up window on the screen
  544.  
  545. Parms:
  546.    DS:DX <-- pointer to parameter list
  547.  
  548. Description:
  549.  
  550. The BV_POPUP service displays a pop-up window on the screen.  A variety of
  551. frames is available for the window.  Titles are optional and will be left-
  552. justified in the top bar of the window if supplied.
  553.  
  554. Frame types are as follows:
  555.  
  556.    0    none (blank)
  557.    1    single lines
  558.    2    double lines
  559.    3    single horizontal lines, double vertical lines
  560.    4    double horizontal lines, single vertical lines
  561.  
  562. The parameter list should look like this:
  563.  
  564. Y1           db ?            ; top row of window
  565. X1           db ?            ; left column of window
  566. Y2           db ?            ; bottom row of window
  567. X2           db ?            ; right column of window
  568. FRAMETYPE    db ?            ; frame type
  569. FRAMECOLOR   db ?            ; frame color
  570. TITLE        dw ?            ; offset (from DS:) of ASCIIZ title
  571.                              ; use 0FFFFh instead if no title is desired
  572.  
  573. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  574. keep the output from this service in a window.
  575.  
  576. Service : BV_SHOWCURSOR
  577.  
  578. Module  : BIOS Video Services
  579.  
  580. Compat  : BIOS
  581.  
  582. Purpose : Shows the cursor
  583.  
  584. Parms:
  585.    none
  586.  
  587. Description:
  588.  
  589. The BV_SHOWCURSOR service shows the cursor, making it visible.  NOTE: This
  590. service may change the cursor shape if used before BV_HIDECURSOR.
  591.  
  592. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  593. keep the output from this service in a window.
  594.  
  595.  
  596.  
  597.  
  598. Service : BV_STROUT
  599.  
  600. Module  : BIOS Video Services
  601.  
  602. Compat  : BIOS
  603.  
  604. Purpose : Displays a string on the screen
  605.  
  606. Parms:
  607.    DS:DX <-- ptr to string to display
  608.  
  609. Description:
  610.  
  611. The BV_STROUT routine displays a string on the screen.  The string must be in
  612. ASCIIZ format (NUL terminated).
  613.  
  614. The following control codes are interpreted:
  615.    7      Bell             beep
  616.    8      Backspace        non-destructive backspace
  617.    9      Tab              space over to the next tab stop
  618.   10      Linefeed         move cursor down one line, scrolling as needed
  619.   12      Formfeed         clear screen and home cursor
  620.   13      Carriage Return  home cursor on current line
  621.  
  622. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  623. keep the output from this service in a window.
  624.  
  625. Service : BV_WHERE
  626.  
  627. Module  : BIOS Video Services
  628.  
  629. Compat  : BIOS
  630.  
  631. Purpose : Gets the cursor position
  632.  
  633. Parms:
  634.    -------
  635.       DH = row (1-25)
  636.       DL = column (1-40/80)
  637.  
  638. Description:
  639.  
  640. The BV_WHERE service gets the cursor position.
  641.  
  642. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  643. keep the output from this service in a window.
  644.  
  645. Service : CG_CHROUT
  646.  
  647. Module  : CGA Graphics Services
  648.  
  649. Compat  : Clone
  650.  
  651. Purpose : Displays a character on the screen
  652.  
  653. Parms:
  654.       AL <-- character to display
  655.  
  656. Description:
  657.  
  658. The CG_CHROUT routine displays a character on the screen.  The screen must be
  659. in one of the CGA graphics modes (video modes 4-6).
  660.  
  661. The following control codes are interpreted:
  662.    7      Bell             beep
  663.    8      Backspace        non-destructive backspace
  664.    9      Tab              space over to the next tab stop
  665.   10      Linefeed         move cursor down one line, scrolling as needed
  666.   12      Formfeed         clear screen and home cursor
  667.   13      Carriage Return  home cursor on current line
  668.  
  669. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  670. keep the output from this service in a window.
  671.  
  672.  
  673.  
  674.  
  675. Service : CG_CLEOLN
  676.  
  677. Module  : CGA Graphics Services
  678.  
  679. Compat  : Clone
  680.  
  681. Purpose : Clears to the end of the line
  682.  
  683. Parms:
  684.    none
  685.  
  686. Description:
  687.  
  688. The CG_CLEOLN service clears from the current cursor position to the end of
  689. the current screen line, inclusive.  The screen must be in one of the CGA
  690. graphics modes (video modes 4-6).
  691.  
  692. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  693. keep the output from this service in a window.
  694.  
  695. Service : CG_CLS
  696.  
  697. Module  : CGA Graphics Services
  698.  
  699. Compat  : Clone
  700.  
  701. Purpose : Clears the screen
  702.  
  703. Parms:
  704.    none
  705.  
  706. Description:
  707.  
  708. The CG_CLS service clears the screen and homes the cursor to the upper left
  709. corner.  The screen must be in one of the CGA graphics modes (video modes
  710. 4-6).
  711.  
  712. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  713. keep the output from this service in a window.
  714.  
  715.  
  716.  
  717.  
  718. Service : CG_COLOR
  719.  
  720. Module  : CGA Graphics Services
  721.  
  722. Compat  : Clone
  723.  
  724. Purpose : Sets the default text color
  725.  
  726. Parms:
  727.       AL <-- default color
  728.  
  729. Description:
  730.  
  731. The CG_COLOR service sets the default text color.  A color/attribute table is
  732. given in the ASMWIZ.DOC file.  In general, however, the background is in the
  733. high nybble and ranges 0-3; the foreground is in the low nybble and also
  734. ranges 0-3.  The actual colors displayed depend on the palette setting.
  735.  
  736. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  737. keep the output from this service in a window.
  738.  
  739. Service : CG_CRLF
  740.  
  741. Module  : CGA Graphics Services
  742.  
  743. Compat  : Clone
  744.  
  745. Purpose : Displays a <CR><LF> (carriage return and linefeed)
  746.  
  747. Parms:
  748.    none
  749.  
  750. Description:
  751.  
  752. The CG_CRLF routine displays a carriage return and linefeed on the screen.
  753. The screen must be in one of the CGA graphics modes (video modes 4-6).
  754.  
  755. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  756. keep the output from this service in a window.
  757.  
  758.  
  759.  
  760.  
  761. Service : CG_GETCOLOR
  762.  
  763. Module  : CGA Graphics Services
  764.  
  765. Compat  : Clone
  766.  
  767. Purpose : Gets the default text color
  768.  
  769. Parms:
  770.    -------
  771.       AL = default color
  772.  
  773. Description:
  774.  
  775. The CG_GETCOLOR service gets the default text color.  A color/attribute table
  776. is given in the ASMWIZ.DOC file.  In general, however, the background is in
  777. the high nybble and ranges 0-3; the foreground is in the low nybble and also
  778. ranges 0-3.  The actual colors displayed depend on the palette setting.
  779.  
  780. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  781. keep the output from this service in a window.
  782.  
  783. Service : CG_INIT
  784.  
  785. Module  : CGA Graphics Services
  786.  
  787. Compat  : Clone
  788.  
  789. Purpose : Initializes the CGA Graphics Services
  790.  
  791. Parms:
  792.    none
  793.  
  794. Description:
  795.  
  796. The CG_INIT routine initializes the CGA Graphics Services.  It should be used
  797. once in your program, before any other CGA Graphics Services are called.
  798.  
  799. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  800. keep the output from this service in a window.
  801.  
  802.  
  803.  
  804.  
  805. Service : CG_LOCATE
  806.  
  807. Module  : CGA Graphics Services
  808.  
  809. Compat  : Clone
  810.  
  811. Purpose : Sets the cursor position
  812.  
  813. Parms:
  814.       DH <-- row (1-25)
  815.       DL <-- column (1-40/80)
  816.  
  817. Description:
  818.  
  819. The CG_LOCATE service sets the cursor position.  The screen must be in one of
  820. the CGA graphics modes (video modes 4-6).
  821.  
  822. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  823. keep the output from this service in a window.
  824.  
  825. Service : CG_MODE
  826.  
  827. Module  : CGA Graphics Services
  828.  
  829. Compat  : Clone
  830.  
  831. Purpose : Sets the screen mode
  832.  
  833. Parms:
  834.       AL <-- screen mode (4-6)
  835.  
  836. Description:
  837.  
  838. The CG_MODE routine sets the screen mode.  This may be any of the following:
  839.  
  840.      Mode  Resolu.  Type  Colr  Use        Adapter(s)
  841.  
  842.        4   320x200  color    4  graphics   CGA, EGA, VGA
  843.        5   320x200  b&w      4  graphics   CGA, EGA, VGA
  844.        6   640x200  color    2  graphics   CGA, EGA, VGA
  845.  
  846. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  847. keep the output from this service in a window.
  848.  
  849.  
  850.  
  851.  
  852. Service : CG_STROUT
  853.  
  854. Module  : CGA Graphics Services
  855.  
  856. Compat  : Clone
  857.  
  858. Purpose : Displays a string on the screen
  859.  
  860. Parms:
  861.    DS:DX <-- ptr to the string to display
  862.  
  863. Description:
  864.  
  865. The CG_STROUT routine displays a string on the screen.  The string must be in
  866. ASCIIZ (NUL terminated) format.  The screen must be in one of the CGA
  867. graphics modes (video modes 4-6).
  868.  
  869. The following control codes are interpreted:
  870.    7      Bell             beep
  871.    8      Backspace        non-destructive backspace
  872.    9      Tab              space over to the next tab stop
  873.   10      Linefeed         move cursor down one line, scrolling as needed
  874.   12      Formfeed         clear screen and home cursor
  875.   13      Carriage Return  home cursor on current line
  876.  
  877. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  878. keep the output from this service in a window.
  879.  
  880. Service : CG_WHERE
  881.  
  882. Module  : CGA Graphics Services
  883.  
  884. Compat  : Clone
  885.  
  886. Purpose : Gets the cursor position
  887.  
  888. Parms:
  889.    -------
  890.       DH = row (1-25)
  891.       DL = column (1-40/80)
  892.  
  893. Description:
  894.  
  895. The CG_WHERE service gets the cursor position.  The screen must be in one of
  896. the CGA graphics modes (video modes 4-6).
  897.  
  898. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  899. keep the output from this service in a window.
  900.  
  901. Service : DF_CLOSE
  902.  
  903. Module  : File Services
  904.  
  905. Compat  : DOS
  906.  
  907. Purpose : Closes a file
  908.  
  909. Parms:
  910.       BX <-- (virtual) file handle
  911.  
  912. Description:
  913.  
  914. The DF_CLOSE service closes a file.  This causes the disk information
  915. associated with the file to be updated and the file handle to be freed.  You
  916. should use DF_CLOSE or DF_DONE to close all files before your program
  917. terminates.
  918.  
  919. If an error occurs, the carry flag is set and AX contains the error code.
  920. The AX register may be modified regardless of whether an error occurs.
  921. Possible errors include specification of an invalid handle and (if critical
  922. error handling is turned on) inability to update the disk.
  923.  
  924.  
  925.  
  926.  
  927. Service : DF_DONE
  928.  
  929. Module  : File Services
  930.  
  931. Compat  : DOS
  932.  
  933. Purpose : Closes all open files
  934.  
  935. Parms:
  936.    none
  937.  
  938. Description:
  939.  
  940. The DF_DONE service closes all open file.  This causes the disk information
  941. associated with the files to be updated and the file handles to be freed.
  942. You should use DF_CLOSE or DF_DONE to close all files before your program
  943. terminates.
  944.  
  945. If an error occurs at any point, the carry flag is set and AX contains the
  946. error code.  The AX register may be modified regardless of whether an error
  947. occurs.  The only error possible is inability to update the disk (only
  948. returned if critical error handling is turned on).
  949.  
  950. Service : DF_FLUSH
  951.  
  952. Module  : File Services
  953.  
  954. Compat  : DOS
  955.  
  956. Purpose : Flushes a file to disk
  957.  
  958. Parms:
  959.       BX <-- (virtual) file handle
  960.  
  961. Description:
  962.  
  963. The DF_FLUSH service flushes a file.  This causes the disk information
  964. associated with the file to be updated as if the file had been closed, only
  965. faster.  This is typically used to make sure a file is properly updated to
  966. its current status, so it won't disappear entirely if the power goes off or a
  967. similar disaster strikes.
  968.  
  969. For DOS versions prior to 3.3, there must be at least one free file handle
  970. for this service to work, because a temporary handle is needed.  For later
  971. DOS versions, there is no such requirement.
  972.  
  973. If an error occurs, the carry flag is set and AX contains the error code.
  974. The AX register may be modified regardless of whether an error occurs.
  975. Possible errors include specification of an invalid handle and (if critical
  976. error handling is turned on) inability to update the disk.
  977.  
  978.  
  979.  
  980.  
  981. Service : DF_GETTIME
  982.  
  983. Module  : File Services
  984.  
  985. Compat  : DOS
  986.  
  987. Purpose : Gets a file's time/date stamp
  988.  
  989. Parms:
  990.       BX <-- (virtual) file handle
  991.    -------
  992.       AX = time (DOS internal format)
  993.       DX = date (DOS internal format)
  994.  
  995. Description:
  996.  
  997. The DF_GETTIME service gets a file's time/date stamp.
  998.  
  999. If an error occurs, the carry flag is set and AX contains the error code.
  1000.  
  1001. Service : DF_HANDLE
  1002.  
  1003. Module  : File Services
  1004.  
  1005. Compat  : DOS
  1006.  
  1007. Purpose : Gets the DOS handle of a file
  1008.  
  1009. Parms:
  1010.       BX <-- (virtual) file handle
  1011.    -------
  1012.       BX = (DOS) file handle
  1013.  
  1014. Description:
  1015.  
  1016. The DF_HANDLE service gets the DOS file handle, given the virtual file handle
  1017. used by the ASMWIZ services.  If the file has an input buffer, the buffer is
  1018. flushed so that any operations you do using the DOS file handle will not
  1019. cause the ASMWIZ services to report incorrect information.
  1020.  
  1021. Note that the correlation between the virtual file handle and DOS file handle
  1022. is not guaranteed to remain constant.  Any time you use an ASMWIZ file
  1023. handling service, the DOS file handle for any given virtual file handle may
  1024. change.  This is required to allow for the future implementation of the
  1025. ability to keep an indefinite number of files open at the same time under any
  1026. DOS version.
  1027.  
  1028. If an error occurs, the carry flag is set and AX contains the error code.
  1029. The only possible error is the specification of an invalid virtual file
  1030. handle.
  1031.  
  1032.  
  1033.  
  1034.  
  1035. Service : DF_INIT
  1036.  
  1037. Module  : File Services
  1038.  
  1039. Compat  : DOS
  1040.  
  1041. Purpose : Initializes the File Services
  1042.  
  1043. Parms:
  1044.       DX <-- 0 (zero)
  1045.  
  1046. Description:
  1047.  
  1048. The DF_INIT service initializes the File Services.  The DX register currently
  1049. must be zero.  It will later be used to pass the PSP segment if you want
  1050. extended file handles, which will allow an indefinite number of files to be
  1051. open at one time.
  1052.  
  1053. Service : DF_LOCATE
  1054.  
  1055. Module  : File Services
  1056.  
  1057. Compat  : DOS
  1058.  
  1059. Purpose : Sets the location of a file's read/write pointer
  1060.  
  1061. Parms:
  1062.       BX <-- (virtual) file handle
  1063.       CL <-- location method (0-2)
  1064.    DX,AX <-- location offset
  1065.  
  1066. Description:
  1067.  
  1068. The DF_LOCATE service sets the location of a file's read/write pointer.  This
  1069. tells the File Services where the next read or write should begin.  You may
  1070. specify any of three location methods:
  1071.  
  1072.    0    offset from the start of the file    absolute offset
  1073.    1    offset from the current location     relative offset
  1074.    2    offset from the end of the file      relative offset
  1075.  
  1076. The "offset from the end of the file" method specifies an offset at, or past,
  1077. the current end of the file.  It is commonly used with an offset of zero to
  1078. set up a file for an append operation.  It can also be used in conjunction
  1079. with DF_WHERE in order to get the size of the file.
  1080.  
  1081. If an error occurs, the carry flag is set and AX contains the error code.
  1082. Possible errors include specification of an invalid handle and (if critical
  1083. error handling is turned on) inability to access the file.
  1084.  
  1085. Service : DF_OPEN
  1086.  
  1087. Module  : File Services
  1088.  
  1089. Compat  : DOS
  1090.  
  1091. Purpose : Opens a file for access
  1092.  
  1093. Parms:
  1094.       AX <-- access method: how to open the file
  1095.    DS:DX <-- pointer to ASCIIZ filename
  1096.       CX <-- input buffer length (use 0 for no buffer)
  1097.    ES:SI <-- pointer to input buffer, if any
  1098.    -------
  1099.       BX = (virtual) file handle
  1100.  
  1101. Description:
  1102.  
  1103. The DF_OPEN service opens a file for access.  File sharing (for networks and
  1104. multitasking) is supported automatically if the DOS version is capable of
  1105. handling it ("deny write" is used).  You must specify the access method in
  1106. AX, as follows:
  1107.  
  1108.    bit 0    allow Reading from the file
  1109.    bit 1    allow Writing to the file
  1110.    bit 2    Create a new file or truncate an existing one to zero bytes
  1111.    bit 3    use Text mode (as opposed to the normal Binary mode)
  1112.  
  1113. Unused bits should be set to zero, to allow compatibility with future
  1114. versions of ASMWIZ.  For instance, to open and read from an existing text
  1115. file, you might use AX = 1001b (1001 binary is 9 in decimal or hex).
  1116.  
  1117. Text mode is handy for use with ASCII text files.  It affects reading from
  1118. and writing to the file.  If text mode is set, reads from the file will stop
  1119. when a carriage return/linefeed sequence is encountered (or if a specified
  1120. maximum number of characters have been read) and a NUL character will be
  1121. added to convert the buffer to a string.  Disk writing in this mode expects
  1122. strings (rather than using a byte count) and will automatically add a
  1123. carriage return/linefeed sequence.  Control-Z is not used as an end of file
  1124. indicator, since such usage is archaic and inappropriate in MS-DOS.
  1125.  
  1126. Note that if you are reading from a file using text mode, you must specify an
  1127. input buffer.  An error code will be returned if you do otherwise.
  1128.  
  1129. Note that the file handle returned is an index into an internal file table
  1130. and is not a normal DOS file handle.  If you need to find out the actual file
  1131. handle used, you can get it from the DF_HANDLE service.
  1132.  
  1133. If an error occurs, the carry flag is set and AX contains the error code. The
  1134. AX register may be modified regardless of whether an error occurs.  The error
  1135. code will be -2 if you attempt to read from a file that was opened in text
  1136. mode without a buffer.  For a list of other possible errors, see the end of
  1137. the ASMWIZ.DOC file.
  1138.  
  1139. Service : DF_READ
  1140.  
  1141. Module  : File Services
  1142.  
  1143. Compat  : DOS
  1144.  
  1145. Purpose : Reads from a file
  1146.  
  1147. Parms:
  1148.       BX <-- (virtual) file handle
  1149.       CX <-- bytes to read (if text mode, is maximum bytes to read)
  1150.    DS:DX <-- pointer to read buffer
  1151.    -------
  1152.       AX = bytes actually read (if NC and not text mode)
  1153.  
  1154. Description:
  1155.  
  1156. The DF_READ service reads from a file.
  1157.  
  1158. For files that were opened in text mode, the read operation will stop on
  1159. encountering a carriage return / linefeed sequence or after having read the
  1160. specified maximum number of bytes.  The CR/LF is not stored in the result.
  1161. The result will be always be converted to ASCIIZ (null-terminated string
  1162. format), so your actual buffer must be at least one byte larger than the
  1163. specified maximum number of bytes.  If nulls are encountered in the input
  1164. stream, they will be converted to spaces.  The Control-Z code is not used as
  1165. an end of file indicator and will be read in like any other character.
  1166.  
  1167. If an error occurs, the carry flag is set and AX contains the error code.
  1168. The AX register may be modified regardless of whether an error occurs.  For a
  1169. list of possible errors, see the end of the ASMWIZ.DOC file.
  1170.  
  1171. Service : DF_TIME
  1172.  
  1173. Module  : File Services
  1174.  
  1175. Compat  : DOS
  1176.  
  1177. Purpose : Sets a file's time/date stamp
  1178.  
  1179. Parms:
  1180.       BX <-- (virtual) file handle
  1181.       AX <-- time (DOS internal format)
  1182.       DX <-- date (DOS internal format)
  1183.  
  1184. Description:
  1185.  
  1186. The DF_TIME service sets a file's time/date stamp.
  1187.  
  1188. If an error occurs, the carry flag is set and AX contains the error code.
  1189.  
  1190.  
  1191.  
  1192.  
  1193. Service : DF_WHERE
  1194.  
  1195. Module  : File Services
  1196.  
  1197. Compat  : DOS
  1198.  
  1199. Purpose : Gets the location of a file's read/write pointer
  1200.  
  1201. Parms:
  1202.       BX <-- (virtual) file handle
  1203.    -------
  1204.    DX,AX = location offset
  1205.  
  1206. Description:
  1207.  
  1208. The DF_WHERE service gets the location of a file's read/write pointer, which
  1209. tells you where the next read or write will begin.
  1210.  
  1211. If an error occurs, the carry flag is set and AX contains the error code.
  1212. Possible errors include specification of an invalid handle and (if critical
  1213. error handling is turned on) inability to access the file.
  1214.  
  1215. Service : DF_WRITE
  1216.  
  1217. Module  : File Services
  1218.  
  1219. Compat  : DOS
  1220.  
  1221. Purpose : Writes to a file
  1222.  
  1223. Parms:
  1224.       BX <-- (virtual) file handle
  1225.       CX <-- bytes to write (if not text mode)
  1226.    DS:DX <-- pointer to write buffer
  1227.  
  1228. Description:
  1229.  
  1230. The DF_WRITE service writes to a file.
  1231.  
  1232. For files that were opened in text mode, the write operation expects an
  1233. ASCIIZ string.  It writes the string to the file without the null terminator,
  1234. then writes a carriage return / linefeed sequence.
  1235.  
  1236. If an error occurs, the carry flag is set and AX contains the error code.
  1237. For a list of possible errors, see the end of the ASMWIZ.DOC file.  If there
  1238. was no error code returned by DOS but the entire buffer wasn't written, an
  1239. error code of -1 (negative one) is returned.
  1240.  
  1241. Service : DV_CHROUT
  1242.  
  1243. Module  : DOS Video Services
  1244.  
  1245. Compat  : DOS
  1246.  
  1247. Purpose : Displays a character on the screen
  1248.  
  1249. Parms:
  1250.       AL <-- character to display
  1251.  
  1252. Description:
  1253.  
  1254. The DV_CHROUT routine displays a character on the screen.
  1255.  
  1256. The following control codes are interpreted:
  1257.    7      Bell             beep
  1258.    8      Backspace        non-destructive backspace
  1259.    9      Tab              space over to the next tab stop
  1260.   10      Linefeed         move cursor down one line, scrolling as needed
  1261.   13      Carriage Return  home cursor on current line
  1262.  
  1263. Redirection, if any, is in effect.  Text from this service may be redirected
  1264. to any file or device.  Pipes can also be used.  Almost all windowing
  1265. multitaskers will be able to keep the output from this service in a window.
  1266.  
  1267.  
  1268.  
  1269.  
  1270. Service : DV_CLEOLN
  1271.  
  1272. Module  : DOS Video Services
  1273.  
  1274. Compat  : DOS (with ANSI)
  1275.  
  1276. Purpose : Clears to the end of the line
  1277.  
  1278. Parms:
  1279.    none
  1280.  
  1281. Description:
  1282.  
  1283. The DV_CLEOLN service clears from the current cursor position to the end of
  1284. the current screen line, inclusive.  It requires ANSI.
  1285.  
  1286. Redirection, if any, is in effect.  Text from this service may be redirected
  1287. to any file or device.  Pipes can also be used.  Almost all windowing
  1288. multitaskers will be able to keep the output from this service in a window.
  1289.  
  1290. Service : DV_CLS
  1291.  
  1292. Module  : DOS Video Services
  1293.  
  1294. Compat  : DOS (with ANSI)
  1295.  
  1296. Purpose : Clears the screen
  1297.  
  1298. Parms:
  1299.    none
  1300.  
  1301. Description:
  1302.  
  1303. The DV_CLS service clears the screen and homes the cursor to the upper left
  1304. corner.  It requires ANSI.
  1305.  
  1306. Redirection, if any, is in effect.  Text from this service may be redirected
  1307. to any file or device.  Pipes can also be used.  Almost all windowing
  1308. multitaskers will be able to keep the output from this service in a window.
  1309.  
  1310.  
  1311.  
  1312.  
  1313. Service : DV_COLOR
  1314.  
  1315. Module  : DOS Video Services
  1316.  
  1317. Compat  : DOS (with ANSI)
  1318.  
  1319. Purpose : Sets the default text color
  1320.  
  1321. Parms:
  1322.       AL <-- default color
  1323.  
  1324. Description:
  1325.  
  1326. The DV_COLOR service sets the default text color.  A color/attribute table is
  1327. given in the ASMWIZ.DOC file.  In general, however, the background is in the
  1328. high nybble and ranges 0-7 in text modes, 0 in graphics modes; the foreground
  1329. is in the low nybble and ranges 0-7 in text modes, 0-x in graphics modes.
  1330.  
  1331. Redirection, if any, is in effect.  Text from this service may be redirected
  1332. to any file or device.  Pipes can also be used.  Almost all windowing
  1333. multitaskers will be able to keep the output from this service in a window.
  1334.  
  1335. Service : DV_CRLF
  1336.  
  1337. Module  : DOS Video Services
  1338.  
  1339. Compat  : DOS
  1340.  
  1341. Purpose : Displays a <CR><LF> (carriage return and linefeed)
  1342.  
  1343. Parms:
  1344.    none
  1345.  
  1346. Description:
  1347.  
  1348. The DV_CRLF routine displays a carriage return and linefeed on the screen.
  1349.  
  1350. Redirection, if any, is in effect.  Text from this service may be redirected
  1351. to any file or device.  Pipes can also be used.  Almost all windowing
  1352. multitaskers will be able to keep the output from this service in a window.
  1353.  
  1354.  
  1355.  
  1356.  
  1357. Service : DV_DELLINE
  1358.  
  1359. Module  : DOS Video Services
  1360.  
  1361. Compat  : DOS (with extended ANSI)
  1362.  
  1363. Purpose : Deletes the current screen row
  1364.  
  1365. Parms:
  1366.    none
  1367.  
  1368. Description:
  1369.  
  1370. The DV_DELLINE service deletes the row on which the cursor is placed.  Any
  1371. rows beneath it are moved up and the bottom line of the screen is cleared to
  1372. a row of spaces in the current screen colors.
  1373.  
  1374. This service is only available under extended versions of the ANSI driver,
  1375. such as NANSI.SYS and ZANSI.SYS.  It requires the use of an ANSI code which
  1376. is not implemented in the standard IBM subset of the ANSI protocol.
  1377.  
  1378. Redirection, if any, is in effect.  Text from this service may be redirected
  1379. to any file or device.  Pipes can also be used.  Almost all windowing
  1380. multitaskers will be able to keep the output from this service in a window.
  1381.  
  1382. Service : DV_FIXCOLOR
  1383.  
  1384. Module  : DOS Video Services
  1385.  
  1386. Compat  : Any
  1387.  
  1388. Purpose : Tells the DV services whether to convert colors to monochrome
  1389.  
  1390. Parms:
  1391.       AL <-- whether to convert to mono (0 no, 1 yes)
  1392.  
  1393. Description:
  1394.  
  1395. The DV_FIXCOLOR service tells the DOS Video services whether to
  1396. convert colors to their monochrome equivalents.  If not, the colors will
  1397. remain as you originally specified.  If so, the colors will be converted to
  1398. appropriate values for use on a monochrome display.
  1399.  
  1400. The color-to-mono translation attempts to mimic the original display as
  1401. closely as possible.  It analyzes the foreground and background colors by
  1402. their intensity.  The results are translated to white on black, bright white
  1403. on black, or black on white.  The "blink" attribute is preserved.  If the
  1404. original foreground was identical to the background (invisible characters),
  1405. the result will be black on black.
  1406.  
  1407. See also the MI_GETSCREEN service, which allows you to automatically detect
  1408. what kind of display is in use.
  1409.  
  1410. Service : DV_INSLINE
  1411.  
  1412. Module  : DOS Video Services
  1413.  
  1414. Compat  : DOS (with extended ANSI)
  1415.  
  1416. Purpose : Inserts a line at the current screen row
  1417.  
  1418. Parms:
  1419.    none
  1420.  
  1421. Description:
  1422.  
  1423. The DV_INSLINE service inserts a row at the current cursor location.  Any
  1424. rows beneath it are moved down and the new line screen is cleared to a row of
  1425. spaces in the current screen colors.
  1426.  
  1427. This service is only available under extended versions of the ANSI driver,
  1428. such as NANSI.SYS and ZANSI.SYS.  It requires the use of an ANSI code which
  1429. is not implemented in the standard IBM subset of the ANSI protocol.
  1430.  
  1431. Redirection, if any, is in effect.  Text from this service may be redirected
  1432. to any file or device.  Pipes can also be used.  Almost all windowing
  1433. multitaskers will be able to keep the output from this service in a window.
  1434.  
  1435.  
  1436.  
  1437.  
  1438. Service : DV_LOCATE
  1439.  
  1440. Module  : DOS Video Services
  1441.  
  1442. Compat  : DOS (with ANSI)
  1443.  
  1444. Purpose : Sets the cursor position
  1445.  
  1446. Parms:
  1447.       DH <-- row (1-25)
  1448.       DL <-- column (1-40/80)
  1449.  
  1450. Description:
  1451.  
  1452. The DV_LOCATE service sets the cursor position.  It requires ANSI.
  1453.  
  1454. Redirection, if any, is in effect.  Text from this service may be redirected
  1455. to any file or device.  Pipes can also be used.  Almost all windowing
  1456. multitaskers will be able to keep the output from this service in a window.
  1457.  
  1458. Service : DV_MODE
  1459.  
  1460. Module  : DOS Video Services
  1461.  
  1462. Compat  : DOS (with ANSI)
  1463.  
  1464. Purpose : Sets the screen mode
  1465.  
  1466. Parms:
  1467.       AL <-- screen mode (0-6)
  1468.  
  1469. Description:
  1470.  
  1471. The DV_MODE routine sets the screen mode.  This may be any of the following:
  1472.  
  1473.      Mode  Resolu.  Type  Colr  Use        Adapter(s)
  1474.  
  1475.        0   40x25    b&w     16  text       CGA, EGA, VGA
  1476.        1   40x25    color   16  text       CGA, EGA, VGA
  1477.        2   80x25    b&w     16  text       CGA, EGA, VGA
  1478.  def-  3   80x25    color   16  text       CGA, EGA, VGA
  1479.        4   320x200  color    4  graphics   CGA, EGA, VGA
  1480.        5   320x200  b&w      4  graphics   CGA, EGA, VGA
  1481.        6   640x200  color    2  graphics   CGA, EGA, VGA
  1482.  
  1483. Additional modes may be available, depending on the ANSI driver used.  See
  1484. description of the BV_MODE service for information on these additional modes.
  1485.  
  1486. Redirection, if any, is in effect.  Text from this service may be redirected
  1487. to any file or device.  Pipes can also be used.  Almost all windowing
  1488. multitaskers will be able to keep the output from this service in a window.
  1489.  
  1490. Service : DV_STROUT
  1491.  
  1492. Module  : DOS Video Services
  1493.  
  1494. Compat  : DOS
  1495.  
  1496. Purpose : Displays a string on the screen
  1497.  
  1498. Parms:
  1499.    DS:DX <-- ptr to the string to display
  1500.  
  1501. Description:
  1502.  
  1503. The DV_STROUT routine displays a string on the screen.  The string must be in
  1504. ASCIIZ (NUL terminated) format.
  1505.  
  1506. The following control codes are interpreted:
  1507.    7      Bell             beep
  1508.    8      Backspace        non-destructive backspace
  1509.    9      Tab              space over to the next tab stop
  1510.   10      Linefeed         move cursor down one line, scrolling as needed
  1511.   13      Carriage Return  home cursor on current line
  1512.  
  1513. Redirection, if any, is in effect.  Text from this service may be redirected
  1514. to any file or device.  Pipes can also be used.  Almost all windowing
  1515. multitaskers will be able to keep the output from this service in a window.
  1516.  
  1517. Service : EH_ADDBREAK
  1518.  
  1519. Module  : Exception Handling Services
  1520.  
  1521. Compat  : DOS
  1522.  
  1523. Purpose : Adds a procedure to be called on ^C or ^Break
  1524.  
  1525. Parms:
  1526.       DX <-- offset of procedure (from CS: near code is assumed)
  1527.    -------
  1528.    Flags = CY if there's no room for another procedure
  1529.            NC if the procedure was added
  1530.  
  1531. Description:
  1532.  
  1533. The EH_ADDBREAK service adds a procedure to the list of procedures to be
  1534. called if Control-C or Control-Break is pressed.  Up to eight procedures can
  1535. be chained this way.  They will be called only if ^C / ^Break has been
  1536. allowed by your program.
  1537.  
  1538. This service allows for orderly shutdown if the user chooses to abort the
  1539. program.  Files are closed automatically, but interrupt vectors are not
  1540. ordinarily restored on program exit, which can lead to catastrophe if you
  1541. have replaced one of the interrupt handlers.  A number of the ASMWIZ services
  1542. do such things and need to execute a shutdown procedure before the program
  1543. terminates: MD_DONE for the 100th-second delay services, for instance.  If
  1544. you allow the user to break out of the program with ^C or ^Break, you should
  1545. make sure that any procedures which must be called before program termination
  1546. are added to the break chain by EH_ADDBREAK.
  1547.  
  1548. Your shutdown routine must be a NEAR procedure.  It may alter any register,
  1549. except SS and SP (the stack must remain intact).  Any BIOS or DOS interrupt
  1550. may be called.  Your routine is expected to exit with a NEAR return.
  1551.  
  1552. If you use EH_ADDBREAK, don't forget to initialize the break handler by
  1553. calling EH_INITBREAK at the start of your program!
  1554.  
  1555. Service : EH_CRITDONE
  1556.  
  1557. Module  : Exception Handling Services
  1558.  
  1559. Compat  : DOS
  1560.  
  1561. Purpose : Terminates the critical error handler
  1562.  
  1563. Parms:
  1564.    none
  1565.  
  1566. Description:
  1567.  
  1568. The EH_CRITDONE service terminates the critical error handler installed by
  1569. EH_INITCRIT.  You can do this if you wish to use your own critical error
  1570. handler or the default handler, for example.  It is not necessary to call
  1571. EH_CRITDONE before terminating your program.
  1572.  
  1573. See also the EH_INITCRIT and EH_CRITERR services.
  1574.  
  1575. Service : EH_CRITERR
  1576.  
  1577. Module  : Exception Handling Services
  1578.  
  1579. Compat  : DOS
  1580.  
  1581. Purpose : Checks for critical errors
  1582.  
  1583. Parms:
  1584.    -------
  1585.       Flags = CY if there was a critical error; AH contains the error code.
  1586.               NC if there was no error
  1587.  
  1588. Description:
  1589.  
  1590. The EH_CRITERR service tells you whether a critical error occurred.  It
  1591. should be used just after any DOS functions which may cause a critical error.
  1592. This includes virtually all disk operations, DOS-based communications and
  1593. printing.  If a critical error occurred, the carry flag will be set, AH will
  1594. contain the critical error code, and AL will contain any normal error code
  1595. that was returned.  If no critical error occurred, the flags and registers
  1596. will be untouched, so normal errors (if any) will pass through.
  1597.  
  1598. This service clears the critical error code when it is called, so if you call
  1599. it a second time, no error will be returned unless another critical error
  1600. occurred in the meantime.
  1601.  
  1602. A list of critical error codes and DOS error codes is included at the end of
  1603. the ASMWIZ.DOC file.
  1604.  
  1605. See also the EH_INITCRIT and EH_CRITDONE services.
  1606.  
  1607. Example:
  1608.    MOV   AH,3Ch     ; create file
  1609.    INT   21h        ;
  1610.    CALL  EH_CRITERR ; see if there was a critical error
  1611.    JNC   All_Ok     ;   no errors at all
  1612.    CMP   AH,0       ; was it a normal error?
  1613.    JZ    NormalErr  ;   yep, go take care of it
  1614.    ; it was a critical error... AH contains the critical error code.
  1615.  
  1616. Service : EH_INITBREAK
  1617.  
  1618. Module  : Exception Handling Services
  1619.  
  1620. Compat  : DOS
  1621.  
  1622. Purpose : Initializes the ^C / ^Break handler
  1623.  
  1624. Parms:
  1625.    none
  1626.  
  1627. Description:
  1628.  
  1629. The EH_INITBREAK service initializes the break handling services.  This
  1630. allows you to either ignore Control-C and Control-Break, or to specify one or
  1631. more procedures to call before your program is terminated.
  1632.  
  1633. See also the EH_ADDBREAK, EH_SETBREAK, and EH_SUBBREAK services.
  1634.  
  1635. Service : EH_INITCRIT
  1636.  
  1637. Module  : Exception Handling Services
  1638.  
  1639. Compat  : DOS
  1640.  
  1641. Purpose : Initializes the critical error handler
  1642.  
  1643. Parms:
  1644.    none
  1645.  
  1646. Description:
  1647.  
  1648. The EH_INITCRIT service initializes and installs a critical error handler.
  1649. This allows your programs to recover from problems that would normally cause
  1650. DOS to display the infamous "A>bort, R>etry, I>gnore" prompt.
  1651.  
  1652. When a critical error occurs, the error handler installed by EH_INITCRIT
  1653. makes a note of what kind of error it was, then tells DOS to ignore the
  1654. error.  Your program is expected to check for critical errors using the
  1655. EH_CRITERR service.
  1656.  
  1657. Note that DOS will not allow certain errors to be ignored.  In that case, DOS
  1658. will act as if a Control-Break had been entered.  The break handling services
  1659. can catch such conditions.  See EH_INITBREAK for more information.
  1660.  
  1661. See also the EH_CRITERR and EH_CRITDONE services.
  1662.  
  1663. Service : EH_SETBREAK
  1664.  
  1665. Module  : Exception Handling Services
  1666.  
  1667. Compat  : DOS
  1668.  
  1669. Purpose : Allows you to turn ^Break / ^C on or off
  1670.  
  1671. Parms:
  1672.       AL   <-- 0 to turn breaks off, 1 to turn them on
  1673.  
  1674. Description:
  1675.  
  1676. The EH_SETBREAK service allows you to turn ^Break / ^C on or off.  If you
  1677. turn breaks off, there will be no effect on your program if these keys are
  1678. pressed.  If you turn them on, pressing these keys will cause your program to
  1679. be terminated after it calls any procedures specified by EH_ADDBREAK.
  1680.  
  1681. Whether breaks are on or off, there is one minor effect that a break key will
  1682. have which can't be prevented: "^C" with a carriage return and linefeed will
  1683. be displayed.  That seems to be controlled by the BIOS, rather than DOS, and
  1684. I haven't yet found a way around it.  I'll be working on it, though.
  1685.  
  1686. If you use EH_SETBREAK, don't forget to initialize the break handler by
  1687. calling EH_INITBREAK at the start of your program!
  1688.  
  1689. Service : EH_SUBBREAK
  1690.  
  1691. Module  : Exception Handling Services
  1692.  
  1693. Compat  : DOS
  1694.  
  1695. Purpose : Removes a procedure from the list to be called on ^C or ^Break
  1696.  
  1697. Parms:
  1698.       DX   <-- offset of procedure (from CS: near code is assumed)
  1699.    -------
  1700.       Flags = CY if the procedure was not in the list
  1701.               NC if the procedure was removed
  1702.  
  1703. Description:
  1704.  
  1705. The EH_SUBBREAK service removes a procedure to the list of procedures to be
  1706. called if Control-C or Control-Break is pressed.  This reverses the effect of
  1707. the EH_ADDBREAK service.
  1708.  
  1709. Service : FI_COMPLETE
  1710.  
  1711. Module  : Filename Manipulation Services
  1712.  
  1713. Compat  : DOS
  1714.  
  1715. Purpose : Completes a filespec
  1716.  
  1717. Parms:
  1718.    DS:SI <-- ptr to filespec
  1719.    DS:BX <-- ptr to default extension (1-3 bytes)
  1720.    ES:DI <-- ptr to result buffer (80 bytes minimum)
  1721.    -------
  1722.       flags: CY = the filespec is not valid
  1723.  
  1724. Description:
  1725.  
  1726. The FI_COMPLETE service completes a file specification.  If no drive was
  1727. specified, the current drive will be inserted.  The directory specification
  1728. will be converted to an absolute path, with "." and ".." references also
  1729. resolved.  If there is no filename, "*.*" will be used.  If there is a
  1730. filename without an extension, the specified default extension will be added.
  1731.  
  1732. Note that this service translates filespecs almost, but not quite, the same
  1733. as DOS would.  The final part of a filespec is assumed to be a filename
  1734. unless it ends in "\".  This means that something like "C:\BIN" will be
  1735. translated to "C:\BIN." (if the default extension is null).  If you want to
  1736. specify a directory named BIN, you would use the form "C:\BIN\", which would
  1737. be translated to "C:\BIN\*.*".  This may seem like a bit of an inconvenience,
  1738. but it removes a dangerous ambiguity from file specification.
  1739.  
  1740. This service does not check to see if the drive or directory specified is
  1741. valid.  It does check to make sure that the specification is valid and will
  1742. trim over-long file or directory names appropriately.  Unlike DOS, directory
  1743. specifications are not allowed to contain extensions, but few people use that
  1744. capability in any event.  I'll see about adding it to a future version,
  1745. however.
  1746.  
  1747. Service : FI_MATCH      (formerly MI_MATCHFILE)
  1748.  
  1749. Module  : Filename Manipulation Services
  1750.  
  1751. Compat  : Any
  1752.  
  1753. Purpose : Determines whether a filename matches a given pattern
  1754.  
  1755. Parms:
  1756.    DS:SI <-- ptr to pattern (which may contain wildcards)
  1757.    ES:DI <-- ptr to filename (which may not contain drive or path specs)
  1758.    -------
  1759.       flags: ZF = the filename matches the pattern
  1760.              NZ = the filename does not match the pattern
  1761.  
  1762. Description:
  1763.  
  1764. The FI_MATCH service compares a filename with a specified pattern.  The
  1765. pattern may contain the "*" or "?" wildcards.  This pattern-matching service
  1766. works just the way DOS does.  It can be used for finding a desired set of
  1767. matches within a list of known files, for excluding an unwanted set of files
  1768. from a directory list, and so forth.
  1769.  
  1770. The DOS "DEL" command is used as a basis for this matcher.  Thus, using "*"
  1771. as a pattern is equivalent to using "*.", not "*.*" as "DIR" would interpret
  1772. the pattern.  The matcher uses the more conservative algorithm in an attempt
  1773. to avoid excessive broadness in its matches.  If you prefer otherwise, simply
  1774. have your program replace the "*" pattern with "*.*" before calling this
  1775. service.
  1776.  
  1777. Service : FI_PATTERN
  1778.  
  1779. Module  : Filename Manipulation Services
  1780.  
  1781. Compat  : Any
  1782.  
  1783. Purpose : Pushes a filename through a pattern specification
  1784.  
  1785. Parms:
  1786.    DS:SI <-- pointer to filename
  1787.    DS:BX <-- pointer to pattern
  1788.    ES:DI <-- pointer to new filename (buffer must be 13 bytes minimum)
  1789.    -------
  1790.    Flags = CY for some errors
  1791.  
  1792. Description:
  1793.  
  1794. The FI_PATTERN service pushes a filename through a specified pattern.  This
  1795. would be used for creating a replacement for the COPY command, for example.
  1796. If you entered a filename of "EXAMPLE.ASM" and a pattern of "*.BAK", for
  1797. instance, the result would be "EXAMPLE.BAK".
  1798.  
  1799. This service expects filenames without drive or directory specifications.
  1800. Wildcards are allowed in the pattern, but not in the filename.  The carry
  1801. flag will be set on return if the filename or pattern were malformed
  1802. (basically, just if they were over 8 chars + "." + 3 chars).
  1803.  
  1804. Service : FI_SPLIT
  1805.  
  1806. Module  : Filename Manipulation Services
  1807.  
  1808. Compat  : Any
  1809.  
  1810. Purpose : Splits a path specification into drive, directory, and filename
  1811.  
  1812. Parms:
  1813.    DS:SI <-- pointer to path specification
  1814.    ES:DI <-- pointer to result buffer (minimum 80 bytes)
  1815.  
  1816. Description:
  1817.  
  1818. The FI_SPLIT service takes a path specification apart into its components.
  1819. Although a full path spec is not required, it is probably a good idea to make
  1820. sure that the spec is reasonable beforehand, as wildly erroneous path specs
  1821. may cause the results to overflow your result buffer.
  1822.  
  1823. The results are stored as a series of ASCIIZ strings.  The drive will be at
  1824. offset 0, the directory at offset 2, and the filename at offset 67.  As you
  1825. might guess, then, the drive is up to one character (plus nul), the directory
  1826. is up to 64 chars (plus nul), and the filename is up to 12 chars (plus nul).
  1827.  
  1828. Service : G4_BOX
  1829.  
  1830. Module  : Graphics Services
  1831.  
  1832. Compat  : Clone
  1833.  
  1834. Purpose : Draws a box
  1835.  
  1836. Parms:
  1837.       CX <-- left X coordinate    (0-319)
  1838.       DX <-- top Y coordinate     (0-199)
  1839.       SI <-- right X coordinate   (0-319)
  1840.       DI <-- bottom Y coordinate  (0-199)
  1841.       AH <-- whether to fill box  (0 no, 1 yes)
  1842.       AL <-- color                (0-3)
  1843.  
  1844. Description:
  1845.  
  1846. The G4_BOX service displays a box on the screen.  The screen must be in
  1847. Mode 4 or 5 (CGA 320x200).
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853. Service : G4_GETPEL
  1854.  
  1855. Module  : Graphics Services
  1856.  
  1857. Compat  : Clone
  1858.  
  1859. Purpose : Gets the current color of a point
  1860.  
  1861. Parms:
  1862.       CX <-- X coordinate (0-319)
  1863.       DX <-- Y coordinate (0-199)
  1864.    -------
  1865.       AL = color (0-3)
  1866.  
  1867. Description:
  1868.  
  1869. The G4_GETPEL service gets the current color of a specified point.  The
  1870. screen must be in Mode 4 or 5 (CGA 320x200).  Why "pel"?  Graphics points are
  1871. also known as pixels or pels.
  1872.  
  1873. Service : G4_LINE
  1874.  
  1875. Module  : Graphics Services
  1876.  
  1877. Compat  : Clone
  1878.  
  1879. Purpose : Draws a line
  1880.  
  1881. Parms:
  1882.       CX <-- starting X coordinate  (0-319)
  1883.       DX <-- starting Y coordinate  (0-199)
  1884.       SI <-- ending X coordinate    (0-319)
  1885.       DI <-- ending Y coordinate    (0-199)
  1886.       AL <-- color                  (0-3)
  1887.  
  1888. Description:
  1889.  
  1890. The G4_LINE service displays a line on the screen.  The screen must be in
  1891. Mode 4 or 5 (CGA 320x200).
  1892.  
  1893. Drawing diagonal lines is a bit slow and will be optimized in a future
  1894. release.  Vertical and horizontal line drawing is extremely fast, however.
  1895. For the CGA, horizontal line drawing is the fastest.
  1896.  
  1897.  
  1898.  
  1899.  
  1900. Service : G4_PLOT
  1901.  
  1902. Module  : Graphics Services
  1903.  
  1904. Compat  : Clone
  1905.  
  1906. Purpose : Sets the color of a point
  1907.  
  1908. Parms:
  1909.       CX <-- X coordinate (0-319)
  1910.       DX <-- Y coordinate (0-199)
  1911.       AL <-- color (0-3)
  1912.  
  1913. Description:
  1914.  
  1915. The G4_PLOT service sets the current color of a specified point.  The screen
  1916. must be in Mode 4 or 5 (CGA 320x200).  Why "pel"?  Graphics points are also
  1917. known as pixels or pels.
  1918.  
  1919. Service : G6_BOX
  1920.  
  1921. Module  : Graphics Services
  1922.  
  1923. Compat  : Clone
  1924.  
  1925. Purpose : Draws a box
  1926.  
  1927. Parms:
  1928.       CX <-- left X coordinate    (0-639)
  1929.       DX <-- top Y coordinate     (0-199)
  1930.       SI <-- right X coordinate   (0-639)
  1931.       DI <-- bottom Y coordinate  (0-199)
  1932.       AH <-- whether to fill box  (0 no, 1 yes)
  1933.       AL <-- color                (0-1)
  1934.  
  1935. Description:
  1936.  
  1937. The G6_BOX service displays a box on the screen.  The screen must be in
  1938. Mode 6 (CGA 640x200).
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944. Service : G6_GETPEL
  1945.  
  1946. Module  : Graphics Services
  1947.  
  1948. Compat  : Clone
  1949.  
  1950. Purpose : Gets the current color of a point
  1951.  
  1952. Parms:
  1953.       CX <-- X coordinate (0-639)
  1954.       DX <-- Y coordinate (0-199)
  1955.    -------
  1956.       AL = color (0-1)
  1957.  
  1958. Description:
  1959.  
  1960. The G6_GETPEL service gets the current color of a specified point.  The
  1961. screen must be in Mode 6 (CGA 640x200).  Why "pel"?  Graphics points are also
  1962. known as pixels or pels.
  1963.  
  1964. Service : G6_LINE
  1965.  
  1966. Module  : Graphics Services
  1967.  
  1968. Compat  : Clone
  1969.  
  1970. Purpose : Draws a line
  1971.  
  1972. Parms:
  1973.       CX <-- starting X coordinate  (0-639)
  1974.       DX <-- starting Y coordinate  (0-199)
  1975.       SI <-- ending X coordinate    (0-639)
  1976.       DI <-- ending Y coordinate    (0-199)
  1977.       AL <-- color                  (0-1)
  1978.  
  1979. Description:
  1980.  
  1981. The G6_LINE service displays a line on the screen.  The screen must be in
  1982. Mode 6 (CGA 640x200).
  1983.  
  1984. Drawing diagonal lines is a bit slow and will be optimized in a future
  1985. release.  Vertical and horizontal line drawing is extremely fast, however.
  1986. For the CGA, horizontal line drawing is the fastest.
  1987.  
  1988.  
  1989.  
  1990.  
  1991. Service : G6_PLOT
  1992.  
  1993. Module  : Graphics Services
  1994.  
  1995. Compat  : Clone
  1996.  
  1997. Purpose : Sets the color of a point
  1998.  
  1999. Parms:
  2000.       CX <-- X coordinate (0-639)
  2001.       DX <-- Y coordinate (0-199)
  2002.       AL <-- color (0-1)
  2003.  
  2004. Description:
  2005.  
  2006. The G6_PLOT service sets the current color of a specified point.  The screen
  2007. must be in Mode 6 (CGA 640x200).  Why "pel"?  Graphics points are also known
  2008. as pixels or pels.
  2009.  
  2010. Service : GD_BOX
  2011.  
  2012. Module  : Graphics Services
  2013.  
  2014. Compat  : Clone
  2015.  
  2016. Purpose : Draws a box
  2017.  
  2018. Parms:
  2019.       CX <-- left X coordinate    (0-319)
  2020.       DX <-- top Y coordinate     (0-199)
  2021.       SI <-- right X coordinate   (0-319)
  2022.       DI <-- bottom Y coordinate  (0-199)
  2023.       AH <-- whether to fill box  (0 no, 1 yes)
  2024.       AL <-- color                (0-15)
  2025.  
  2026. Description:
  2027.  
  2028. The GD_BOX service displays a box on the screen.  The screen must be in
  2029. Mode 0Dh (EGA 320x200).
  2030.  
  2031. Service : GD_LINE
  2032.  
  2033. Module  : Graphics Services
  2034.  
  2035. Compat  : Clone
  2036.  
  2037. Purpose : Draws a line
  2038.  
  2039. Parms:
  2040.       CX <-- starting X coordinate  (0-319)
  2041.       DX <-- starting Y coordinate  (0-199)
  2042.       SI <-- ending X coordinate    (0-319)
  2043.       DI <-- ending Y coordinate    (0-199)
  2044.       AL <-- color                  (0-15)
  2045.  
  2046. Description:
  2047.  
  2048. The GD_LINE service displays a line on the screen.  The screen must be in
  2049. Mode 0Dh (EGA 320x200).
  2050.  
  2051. Drawing diagonal lines is a bit slow and will be optimized in a future
  2052. release.  Vertical and horizontal line drawing is extremely fast, however.
  2053. For the EGA, vertical line drawing is the fastest.
  2054.  
  2055.  
  2056.  
  2057.  
  2058. Service : GD_PLOT
  2059.  
  2060. Module  : Graphics Services
  2061.  
  2062. Compat  : Clone
  2063.  
  2064. Purpose : Sets the color of a point
  2065.  
  2066. Parms:
  2067.       CX <-- X coordinate (0-319)
  2068.       DX <-- Y coordinate (0-199)
  2069.       AL <-- color (0-15)
  2070.  
  2071. Description:
  2072.  
  2073. The GD_PLOT service sets the current color of a specified point.  The screen
  2074. must be in Mode 0Dh (EGA 320x200).  Why "pel"?  Graphics points are also known
  2075. as pixels or pels.
  2076.  
  2077. Service : GE_BOX
  2078.  
  2079. Module  : Graphics Services
  2080.  
  2081. Compat  : Clone
  2082.  
  2083. Purpose : Draws a box
  2084.  
  2085. Parms:
  2086.       CX <-- left X coordinate    (0-639)
  2087.       DX <-- top Y coordinate     (0-199/349)
  2088.       SI <-- right X coordinate   (0-639)
  2089.       DI <-- bottom Y coordinate  (0-199/349)
  2090.       AH <-- whether to fill box  (0 no, 1 yes)
  2091.       AL <-- color                (0-15)
  2092.  
  2093. Description:
  2094.  
  2095. The GE_BOX service displays a box on the screen.  The screen must be in
  2096. Mode 0Eh (EGA 640x200) or Mode 10h (EGA 640x350).
  2097.  
  2098. Service : GE_LINE
  2099.  
  2100. Module  : Graphics Services
  2101.  
  2102. Compat  : Clone
  2103.  
  2104. Purpose : Draws a line
  2105.  
  2106. Parms:
  2107.       CX <-- starting X coordinate  (0-639)
  2108.       DX <-- starting Y coordinate  (0-199/349)
  2109.       SI <-- ending X coordinate    (0-639)
  2110.       DI <-- ending Y coordinate    (0-199/349)
  2111.       AL <-- color                  (0-15)
  2112.  
  2113. Description:
  2114.  
  2115. The GE_LINE service displays a line on the screen.  The screen must be in
  2116. Mode 0Eh (EGA 640x200) or Mode 10h (EGA 640x350).
  2117.  
  2118. Drawing diagonal lines is a bit slow and will be optimized in a future
  2119. release.  Vertical and horizontal line drawing is extremely fast, however.
  2120. For the EGA, vertical line drawing is the fastest.
  2121.  
  2122.  
  2123.  
  2124.  
  2125. Service : GE_PLOT
  2126.  
  2127. Module  : Graphics Services
  2128.  
  2129. Compat  : Clone
  2130.  
  2131. Purpose : Sets the color of a point
  2132.  
  2133. Parms:
  2134.       CX <-- X coordinate (0-639)
  2135.       DX <-- Y coordinate (0-199/349)
  2136.       AL <-- color (0-15)
  2137.  
  2138. Description:
  2139.  
  2140. The GE_PLOT service sets the current color of a specified point.  The screen
  2141. must be in Mode 0Eh (EGA 640x200) or Mode 10h (EGA 640x350).  Why "pel"?
  2142. Graphics points are also known as pixels or pels.
  2143.  
  2144. Service : GH_BOX
  2145.  
  2146. Module  : Graphics Services
  2147.  
  2148. Compat  : Clone
  2149.  
  2150. Purpose : Draws a box
  2151.  
  2152. Parms:
  2153.       CX <-- left X coordinate    (0-719)
  2154.       DX <-- top Y coordinate     (0-347)
  2155.       SI <-- right X coordinate   (0-719)
  2156.       DI <-- bottom Y coordinate  (0-347)
  2157.       AH <-- whether to fill box  (0 no, 1 yes)
  2158.       AL <-- color                (0-1)
  2159.  
  2160. Description:
  2161.  
  2162. The GH_BOX service displays a box on the screen.  The screen must be in
  2163. Hercules graphics mode.  It is not actually important that the upper left
  2164. corner and lower right corner of the box be specified in that order.
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170. Service : GH_GETPEL
  2171.  
  2172. Module  : Graphics Services
  2173.  
  2174. Compat  : Clone
  2175.  
  2176. Purpose : Gets the current color of a point
  2177.  
  2178. Parms:
  2179.       CX <-- X coordinate (0-719)
  2180.       DX <-- Y coordinate (0-347)
  2181.    -------
  2182.       AL = color (0-1)
  2183.  
  2184. Description:
  2185.  
  2186. The GH_GETPEL service gets the current color of a specified point.  The
  2187. screen must be in Hercules graphics mode.  Why "pel"?  Graphics points are
  2188. also known as pixels or pels.
  2189.  
  2190. Service : GH_LINE
  2191.  
  2192. Module  : Graphics Services
  2193.  
  2194. Compat  : Clone
  2195.  
  2196. Purpose : Draws a line
  2197.  
  2198. Parms:
  2199.       CX <-- starting X coordinate  (0-719)
  2200.       DX <-- starting Y coordinate  (0-347)
  2201.       SI <-- ending X coordinate    (0-719)
  2202.       DI <-- ending Y coordinate    (0-347)
  2203.       AL <-- color                  (0-1)
  2204.  
  2205. Description:
  2206.  
  2207. The GH_LINE service displays a line on the screen.  The screen must be in
  2208. Hercules graphics mode.
  2209.  
  2210. Drawing diagonal lines is a bit slow and will be optimized in a future
  2211. release.  Vertical and horizontal line drawing is extremely fast, however.
  2212.  
  2213.  
  2214.  
  2215.  
  2216. Service : GH_PLOT
  2217.  
  2218. Module  : Graphics Services
  2219.  
  2220. Compat  : Clone
  2221.  
  2222. Purpose : Sets the color of a point
  2223.  
  2224. Parms:
  2225.       CX <-- X coordinate (0-719)
  2226.       DX <-- Y coordinate (0-347)
  2227.       AL <-- color (0-1)
  2228.  
  2229. Description:
  2230.  
  2231. The GH_PLOT service sets the current color of a specified point.  The screen
  2232. must be in Hercules graphics mode.  Why "pel"?  Graphics points are also known
  2233. as pixels or pels.
  2234.  
  2235. Service : HG_CHROUT
  2236.  
  2237. Module  : Hercules Graphics Services
  2238.  
  2239. Compat  : Clone
  2240.  
  2241. Purpose : Displays a character on the screen
  2242.  
  2243. Parms:
  2244.       AL <-- character to display
  2245.  
  2246. Description:
  2247.  
  2248. The HG_CHROUT routine displays a character on the screen.  The screen must be
  2249. in Hercules graphics mode.
  2250.  
  2251. The following control codes are interpreted:
  2252.    7      Bell             beep
  2253.    8      Backspace        non-destructive backspace
  2254.    9      Tab              space over to the next tab stop
  2255.   10      Linefeed         move cursor down one line, scrolling as needed
  2256.   12      Formfeed         clear screen and home cursor
  2257.   13      Carriage Return  home cursor on current line
  2258.  
  2259. Redirection, if any, is ignored.  Windowing multitaskers will not be able to
  2260. keep the output from this service in a window.
  2261.  
  2262.  
  2263.  
  2264.  
  2265. Service : HG_CLEOLN
  2266.  
  2267. Module  : Hercules Graphics Services
  2268.  
  2269. Compat  : Clone
  2270.  
  2271. Purpose : Clears to the end of the line
  2272.  
  2273. Parms:
  2274.    none
  2275.  
  2276. Description:
  2277.  
  2278. The HG_CLEOLN service clears from the current cursor position to the end of
  2279. the current screen line, inclusive.  The screen must be in Hercules graphics
  2280. mode.
  2281.  
  2282. Redirection, if any, is ignored.  Windowing multitaskers will not be able to
  2283. keep the output from this service in a window.
  2284.  
  2285. Service : HG_CLS
  2286.  
  2287. Module  : Hercules Graphics Services
  2288.  
  2289. Compat  : Clone
  2290.  
  2291. Purpose : Clears the screen
  2292.  
  2293. Parms:
  2294.    none
  2295.  
  2296. Description:
  2297.  
  2298. The HG_CLS service clears the screen and homes the cursor to the upper left
  2299. corner.  The screen must be in Hercules graphics mode.
  2300.  
  2301. Redirection, if any, is ignored.  Windowing multitaskers will not be able to
  2302. keep the output from this service in a window.
  2303.  
  2304.  
  2305.  
  2306.  
  2307. Service : HG_COLOR
  2308.  
  2309. Module  : Hercules Graphics Services
  2310.  
  2311. Compat  : Clone
  2312.  
  2313. Purpose : Sets the default text color
  2314.  
  2315. Parms:
  2316.       AL <-- default color
  2317.  
  2318. Description:
  2319.  
  2320. The HG_COLOR service sets the default text color.  The background is in the
  2321. high nybble and the foreground in the low nybble.  Colors may be 0 (black) or
  2322. 1 (white), giving the following possibilities:
  2323.  
  2324.   Fore   Back    Color in AL
  2325.   -----  -----   -----------
  2326.   black  black       00h
  2327.   black  white       10h     (reverse video)
  2328.   white  black       01h     (normal video)
  2329.   white  white       11h
  2330.  
  2331.  
  2332. Redirection, if any, is ignored.  Windowing multitaskers will not be able to
  2333. keep the output from this service in a window.
  2334.  
  2335. Service : HG_CRLF
  2336.  
  2337. Module  : Hercules Graphics Services
  2338.  
  2339. Compat  : Clone
  2340.  
  2341. Purpose : Displays a <CR><LF> (carriage return and linefeed)
  2342.  
  2343. Parms:
  2344.    none
  2345.  
  2346. Description:
  2347.  
  2348. The HG_CRLF routine displays a carriage return and linefeed on the screen.
  2349. The screen must be in Hercules graphics mode.
  2350.  
  2351. Redirection, if any, is ignored.  Windowing multitaskers will not be able to
  2352. keep the output from this service in a window.
  2353.  
  2354.  
  2355.  
  2356.  
  2357. Service : HG_GETCOLOR
  2358.  
  2359. Module  : Hercules Graphics Services
  2360.  
  2361. Compat  : Clone
  2362.  
  2363. Purpose : Gets the default text color
  2364.  
  2365. Parms:
  2366.    -------
  2367.       AL = default color
  2368.  
  2369. Description:
  2370.  
  2371. The HG_GETCOLOR service gets the default text color.  The background is in
  2372. the high nybble and the foreground in the low nybble.  Colors may be 0
  2373. (black) or 1 (white), giving the following possibilities:
  2374.  
  2375.   Fore   Back    Color in AL
  2376.   -----  -----   -----------
  2377.   black  black       00h
  2378.   black  white       10h     (reverse video)
  2379.   white  black       01h     (normal video)
  2380.   white  white       11h
  2381.  
  2382.  
  2383. Redirection, if any, is ignored.  Windowing multitaskers will not be able to
  2384. keep the output from this service in a window.
  2385.  
  2386. Service : HG_LOCATE
  2387.  
  2388. Module  : Hercules Graphics Services
  2389.  
  2390. Compat  : Clone
  2391.  
  2392. Purpose : Sets the cursor position
  2393.  
  2394. Parms:
  2395.       DH <-- row (1-43)
  2396.       DL <-- column (1-90)
  2397.  
  2398. Description:
  2399.  
  2400. The HG_LOCATE service sets the cursor position.  The screen must be in
  2401. Hercules graphics mode.
  2402.  
  2403. Redirection, if any, is ignored.  Windowing multitaskers will not be able to
  2404. keep the output from this service in a window.
  2405.  
  2406. Service : HG_MODE
  2407.  
  2408. Module  : Hercules Graphics Services
  2409.  
  2410. Compat  : Clone
  2411.  
  2412. Purpose : Sets the screen mode
  2413.  
  2414. Parms:
  2415.       AL <-- screen mode (0-1)
  2416.  
  2417. Description:
  2418.  
  2419. The HG_MODE service sets the screen mode.  Since the Hercules graphics mode
  2420. is not assigned a BIOS mode number, I've set up an arbitrary system.  The
  2421. mode may be either:
  2422.  
  2423.      Mode   Resolu.       Use       Notes
  2424.  
  2425.        0     80x25       text     same as BIOS mode 7: normal MDA
  2426.        1     90x43     graphics   this is a 720x348 graphics mode
  2427.  
  2428. The HG services are designed for use in Hercules graphics mode.  When in text
  2429. mode, the Hercules operates like an ordinary MDA, so you should use the MV,
  2430. BV, or DV services instead.
  2431.  
  2432. Redirection, if any, is ignored.  Windowing multitaskers will not be able to
  2433. keep the output from this service in a window.
  2434.  
  2435.  
  2436.  
  2437.  
  2438. Service : HG_STROUT
  2439.  
  2440. Module  : Hercules Graphics Services
  2441.  
  2442. Compat  : Clone
  2443.  
  2444. Purpose : Displays a string on the screen
  2445.  
  2446. Parms:
  2447.    DS:DX <-- ptr to the string to display
  2448.  
  2449. Description:
  2450.  
  2451. The HG_STROUT routine displays a string on the screen.  The string must be in
  2452. ASCIIZ (NUL terminated) format.  The screen must be in Hercules graphics
  2453. mode.
  2454.  
  2455. The following control codes are interpreted:
  2456.    7      Bell             beep
  2457.    8      Backspace        non-destructive backspace
  2458.    9      Tab              space over to the next tab stop
  2459.   10      Linefeed         move cursor down one line, scrolling as needed
  2460.   12      Formfeed         clear screen and home cursor
  2461.   13      Carriage Return  home cursor on current line
  2462.  
  2463. Redirection, if any, is ignored.  Windowing multitaskers will not be able to
  2464. keep the output from this service in a window.
  2465.  
  2466. Service : HG_WHERE
  2467.  
  2468. Module  : Hercules Graphics Services
  2469.  
  2470. Compat  : Clone
  2471.  
  2472. Purpose : Gets the cursor position
  2473.  
  2474. Parms:
  2475.    -------
  2476.       DH = row (1-43)
  2477.       DL = column (1-90)
  2478.  
  2479. Description:
  2480.  
  2481. The HG_WHERE service gets the cursor position.  The screen must be in
  2482. Hercules graphics mode.
  2483.  
  2484. Redirection, if any, is ignored.  Windowing multitaskers will not be able to
  2485. keep the output from this service in a window.
  2486.  
  2487. Service : MA_ADD32
  2488.  
  2489. Module  : Math (32-bit) Services
  2490.  
  2491. Compat  : Any
  2492.  
  2493. Purpose : Adds two unsigned long integers
  2494.  
  2495. Parms:
  2496.    DS:SI   <-- first operand
  2497.    DS:SI+4 <-- second operand
  2498.    -------
  2499.    DS:SI+8 = result
  2500.  
  2501. Description:
  2502.  
  2503. The MA_ADD32 routine adds two unsigned long integers, giving a result of the
  2504. same type.  Since such numbers are rather bulky, they are passed through a
  2505. buffer rather than through registers.  The numbers in the buffer are stored
  2506. in normal Intel format, least significant word to most significant word.  The
  2507. buffer should look something like this:
  2508.  
  2509.    FIRST32   dd ?
  2510.    SECOND32  dd ?
  2511.    RESULT32  dd ?
  2512.  
  2513. Service : MA_DIV32
  2514.  
  2515. Module  : Math (32-bit) Services
  2516.  
  2517. Compat  : Any
  2518.  
  2519. Purpose : Divides an unsigned "near very long" integer by a long integer
  2520.  
  2521. Parms:
  2522.    DS:SI   <-- dividend (64 bits: high bit must be zero)
  2523.    DS:SI+8 <-- divisor (unsigned long integer)
  2524.    -------
  2525.    DS:SI+12 = quotient (unsigned long integer)
  2526.    DS:SI+16 = remainder (unsigned long integer)
  2527.  
  2528. Description:
  2529.  
  2530. The MA_DIV32 routine divides an unsigned 63-bit integer by an unsigned long
  2531. integer, giving a quotient and remainder.
  2532.  
  2533. Since the numbers are rather bulky, they are passed through a buffer rather
  2534. than through registers.  The numbers in the buffer are stored in normal Intel
  2535. format, least significant word to most significant word.  The buffer should
  2536. look something like this:
  2537.  
  2538.    FIRST64   dq ?
  2539.    SECOND32  dd ?
  2540.    RESULT32  dd ?
  2541.    REMAIN32  dd ?
  2542.  
  2543. Note that since this service uses unsigned numbers, it is possible to use it
  2544. to divide a 32-bit quantity by another 32-bit quantity, giving a 32-bit
  2545. result.  In that case, just convert the 32-bit dividend to 64 bits by making
  2546. the upper 32 bits zero.  The BC_LONG2ASC service uses this approach in the
  2547. course of its work.
  2548.  
  2549. Service : MA_MUL32
  2550.  
  2551. Module  : Math (32-bit) Services
  2552.  
  2553. Compat  : Any
  2554.  
  2555. Purpose : Multiplies two unsigned long integers
  2556.  
  2557. Parms:
  2558.    DS:SI   <-- first operand
  2559.    DS:SI+4 <-- second operand
  2560.    -------
  2561.    DS:SI+8 = result (64 bits)
  2562.  
  2563. Description:
  2564.  
  2565. The MA_MUL32 routine multiplies two unsigned long integers, giving a result
  2566. of a type that might be called an unsigned very long integer (64 bits).
  2567. Since such numbers are rather bulky, they are passed through a buffer rather
  2568. than through registers.  The numbers in the buffer are stored in normal Intel
  2569. format, least significant word to most significant word.  The buffer should
  2570. look something like this:
  2571.  
  2572.    FIRST32   dd ?
  2573.    SECOND32  dd ?
  2574.    RESULT64  dq ?
  2575.  
  2576. Note that since this service uses unsigned numbers, it is possible to use it
  2577. to multiply a 32-bit quantity by a 16-bit quantity, giving (maybe) a 32-bit
  2578. result.  In that case, just convert the 16-bit quantity to 32 bits by making
  2579. the upper 16 bits zero; if the next-to-highest word of the result is nonzero,
  2580. there was an overflow, and the result did not fit into 32 bits.
  2581.  
  2582. Service : MA_SUB32
  2583.  
  2584. Module  : Math (32-bit) Services
  2585.  
  2586. Compat  : Any
  2587.  
  2588. Purpose : Subtracts one unsigned long integer from another
  2589.  
  2590. Parms:
  2591.    DS:SI   <-- first operand
  2592.    DS:SI+4 <-- second operand
  2593.    -------
  2594.    DS:SI+8 = result
  2595.  
  2596. Description:
  2597.  
  2598. The MA_SUB32 routine subtracts one unsigned long integer from another, giving
  2599. a result of the same type.  Since such numbers are rather bulky, they are
  2600. passed through a buffer rather than through registers.  The numbers in the
  2601. buffer are stored in normal Intel format, least significant word to most
  2602. significant word.  The buffer should look something like this:
  2603.  
  2604.    FIRST32   dd ?
  2605.    SECOND32  dd ?
  2606.    RESULT32  dd ?
  2607.  
  2608. Service : MD_DELAY
  2609.  
  2610. Module  : Delay Services
  2611.  
  2612. Compat  : Clone
  2613.  
  2614. Purpose : Delays for a number of 100ths of seconds
  2615.  
  2616. Parms:
  2617.       CX <-- delay (0-32767)
  2618.  
  2619. Description:
  2620.  
  2621. The MD_DELAY service waits for a specified number of clock ticks.  This is
  2622. based on the timer system initialized by the MD_INIT service.  Timer #0 is
  2623. used by MD_DELAY, so you should avoid Timer #0 if you use MD_DELAY.
  2624.  
  2625. If you use the 100th-second time services, it is vital that you initialize
  2626. them with MD_INIT (at the start of your program) and terminate them with
  2627. MD_DONE (at the end of your program).
  2628.  
  2629. Since the system clock is maintained via the interrupt system, interrupts
  2630. will be enabled for the duration of this service, to avoid an infinite delay.
  2631.  
  2632. This service has been designed to accommodate multitaskers.  If another task
  2633. is in operation, the delay may be a trifle longer than expected, however.
  2634.  
  2635.  
  2636.  
  2637.  
  2638. Service : MD_DONE
  2639.  
  2640. Module  : Delay Services
  2641.  
  2642. Compat  : Clone
  2643.  
  2644. Purpose : Terminates the 100th-second timer handler
  2645.  
  2646. Parms:
  2647.    none
  2648.  
  2649. Description:
  2650.  
  2651. The MD_DONE service terminates the 100th-second timer handler.  The original
  2652. timer interrupt is restored and the system clock is reset to 18.2 cycles per
  2653. second, which is presumed to have been the original speed.
  2654.  
  2655. If you use the 100th-second time services, it is vital that you initialize
  2656. them with MD_INIT (at the start of your program) and terminate them with
  2657. MD_DONE (at the end of your program).
  2658.  
  2659. Service : MD_GETTIMER
  2660.  
  2661. Module  : Delay Services
  2662.  
  2663. Compat  : Clone
  2664.  
  2665. Purpose : Gets one of the 100th-second countdown timers
  2666.  
  2667. Parms:
  2668.       AL <-- timer number (0-3)
  2669.    -------
  2670.       CX = time count (0-65,534)
  2671.  
  2672. Description:
  2673.  
  2674. The MD_GETTIMER service gets the time remaining from one of the 100th-second
  2675. countdown timers.  The time returned will be in 200ths of seconds.  It is
  2676. expected that you will normally just compare the result with zero to see if
  2677. the countdown time has elapsed.  See the MD_SETTIMER service for details.
  2678.  
  2679. If you use the 100th-second time services, it is vital that you initialize
  2680. them with MD_INIT (at the start of your program) and terminate them with
  2681. MD_DONE (at the end of your program).
  2682.  
  2683.  
  2684.  
  2685.  
  2686. Service : MD_INIT
  2687.  
  2688. Module  : Delay Services
  2689.  
  2690. Compat  : Clone
  2691.  
  2692. Purpose : Initializes the 100th-second timer handler
  2693.  
  2694. Parms:
  2695.    none
  2696.  
  2697. Description:
  2698.  
  2699. The MD_INIT service initializes the 100th-second timer handler.  The system
  2700. clock is reset to 200.27 cycles per second.  The old timer interrupt is
  2701. executed every 11th time through, so as to maintain the usual 18.2 cycles per
  2702. second for the rest of the system.
  2703.  
  2704. If you use the 100th-second time services, it is vital that you initialize
  2705. them with MD_INIT (at the start of your program) and terminate them with
  2706. MD_DONE (at the end of your program).
  2707.  
  2708. The MD_INIT service provides up to four countdown timers which may be
  2709. accessed by the MD_SETTIMER and MD_GETTIMER services.  These countdown timers
  2710. decrement their respective counts at a rate of 100 per second.  The count is
  2711. not allowed to go below zero.
  2712.  
  2713. Service : MD_SETTIMER
  2714.  
  2715. Module  : Delay Services
  2716.  
  2717. Compat  : Clone
  2718.  
  2719. Purpose : Sets one of the 100th-second countdown timers
  2720.  
  2721. Parms:
  2722.       AL <-- timer number (0-3)
  2723.       CX <-- time count (0-32,767)
  2724.  
  2725. Description:
  2726.  
  2727. The MD_SETTIMER service sets one of the 100th-second countdown timers going.
  2728. The time will be decremented once every 100th of a second until it reaches
  2729. zero.  This is useful for occasions where you need to do something within a
  2730. specified amount of time.  For instance, in a communications program you
  2731. might want a "receive character" routine to keep looking for a character for
  2732. up to a second before returning a "time out" error.
  2733.  
  2734. Up to four countdown timers are available.  Timer 0 is used by MD_DELAY, so
  2735. don't access it if you wish to use the MD_DELAY service.  Timer 1 is reserved
  2736. for the upcoming MU_MUSIC music service, so don't use it if you would like to
  2737. add music to a future program.  Timers 2-3 are always available for your own
  2738. use.
  2739.  
  2740. The time count is restricted to a maximum of 32,767 because it is doubled
  2741. internally.  The timer runs at 200 cycles/second to improve accuracy and make
  2742. it easy to maintain the old rate of 18.2 cycles/second for the system.
  2743.  
  2744. If you use the 100th-second time services, it is vital that you initialize
  2745. them with MD_INIT (at the start of your program) and terminate them with
  2746. MD_DONE (at the end of your program).
  2747.  
  2748.  
  2749.  
  2750.  
  2751. Service : MD_TICK
  2752.  
  2753. Module  : Delay Services
  2754.  
  2755. Compat  : Clone
  2756.  
  2757. Purpose : Delays for a number of clock ticks (18ths of seconds)
  2758.  
  2759. Parms:
  2760.       CX <-- delay (0-65535)
  2761.  
  2762. Description:
  2763.  
  2764. The MD_TICK service waits for a specified number of clock ticks.  This is
  2765. based on the system clock.  There are about 18.2 ticks per second, so the
  2766. delay for one tick is approximately 1/18th second.
  2767.  
  2768. Since the system clock is maintained via the interrupt system, interrupts
  2769. will be enabled for the duration of this service, to avoid an infinite delay.
  2770.  
  2771. This service has been designed to accommodate multitaskers.  If another task
  2772. is in operation, the delay may be a trifle longer than expected, however.
  2773.  
  2774. Service : ME_BINFO
  2775.  
  2776. Module  : Memory Services
  2777.  
  2778. Compat  : Clone
  2779.  
  2780. Purpose : Gets information about a BSAVE-format memory image
  2781.  
  2782. Parms:
  2783.    DS:DX <-- pointer to ASCIIZ filename
  2784.    -------
  2785.    ES:SI = memory image segment:offset
  2786.       CX = memory image size (bytes)
  2787.    Flags = CY if unable to get information; AX = error code
  2788.  
  2789. Description:
  2790.  
  2791. The ME_BINFO service gets information about a memory image stored in a
  2792. BSAVE-format file.  The information is retrieved from the file header.
  2793.  
  2794. The BSAVE format is used by BASIC in storing memory images to disk.  It is
  2795. typically used for saving screen images.
  2796.  
  2797. If there is an error in reading from the specified file, the carry flag will
  2798. be set and an error code will be returned.  The error code corresponds with
  2799. normal DOS error codes, except for the code of -1, which means that the file
  2800. was not in BSAVE format.
  2801.  
  2802. The following information may prove helpful in decoding picture files:
  2803.  
  2804.    Segment      Picture type
  2805.  
  2806.     B000h       Monochrome (Hercules graphics)
  2807.     B800h       CGA
  2808.     A000h       EGA (black and white, unless there are multiple files)
  2809.  
  2810. Service : ME_BLOAD
  2811.  
  2812. Module  : Memory Services
  2813.  
  2814. Compat  : Clone
  2815.  
  2816. Purpose : Restores a memory image from a BSAVE-format file
  2817.  
  2818. Parms:
  2819.    DS:DX <-- pointer to ASCIIZ filename
  2820.    -------
  2821.    Flags = CY if unable to load memory image; AX = error code
  2822.  
  2823. Description:
  2824.  
  2825. The ME_BLOAD service restores a memory image from a file in BSAVE format.
  2826. The image is restored to the location from which it was originally saved.
  2827.  
  2828. The BSAVE format is used by BASIC in storing memory images to disk.  It is
  2829. typically used for saving screen images.
  2830.  
  2831. If there is an error in reading from the specified file, the carry flag will
  2832. be set and an error code will be returned.  The error code corresponds with
  2833. normal DOS error codes, except for the code of -1, which means that the file
  2834. was not in BSAVE format.
  2835.  
  2836. The following information may prove helpful in decoding picture files:
  2837.  
  2838.    Segment      Picture type
  2839.  
  2840.     B000h       Monochrome (Hercules graphics)
  2841.     B800h       CGA
  2842.     A000h       EGA (black and white, unless there are multiple files)
  2843.  
  2844. Service : ME_BSAVE
  2845.  
  2846. Module  : Memory Services
  2847.  
  2848. Compat  : Clone
  2849.  
  2850. Purpose : Saves a memory image to a BSAVE-format file
  2851.  
  2852. Parms:
  2853.    DS:DX <-- pointer to ASCIIZ filename
  2854.    ES:SI <-- pointer to start of area to be saved
  2855.       CX <-- size of memory area (bytes)
  2856.    -------
  2857.    Flags = CY if unable to save memory image; AX = error code
  2858.  
  2859. Description:
  2860.  
  2861. The ME_BSAVE service saves a memory image to a file in BSAVE format.
  2862.  
  2863. The BSAVE format is used by BASIC in storing memory images to disk.  It is
  2864. typically used for saving screen images.
  2865.  
  2866. If there is an error in writing to the specified file, the carry flag will
  2867. be set and an error code will be returned.  The error code corresponds with
  2868. normal DOS error codes.
  2869.  
  2870. The following information may prove helpful in saving picture files (note
  2871. that the offset is normally zero):
  2872.  
  2873.    Segment      Picture type               Length
  2874.  
  2875.     B000h       Hercules graphics          16,384
  2876.     B800h       CGA graphics               16,384
  2877.     A000h       EGA (black and white)      28,000
  2878.  
  2879. It is possible to save EGA pictures in color, using four files rather than
  2880. one.  This is a bit awkward, though, so we'll save it for a future version of
  2881. ASMWIZ (using the PCX file format, instead).
  2882.  
  2883. Service : ME_HIGHOFS
  2884.  
  2885. Module  : Memory Services
  2886.  
  2887. Compat  : Any
  2888.  
  2889. Purpose : Converts an address to have the lowest segment and highest offset
  2890.  
  2891. Parms:
  2892.    DX:AX <-- segment:offset
  2893.    -------
  2894.    DX:AX = converted segment:offset
  2895.  
  2896. Description:
  2897.  
  2898. The ME_HIGHOFS service converts an address so that it has the highest
  2899. possible offset and lowest possible segment.  This allows you to work
  2900. backwards from this address by up to 65,519 bytes without wrapping around
  2901. within the segment, which is a convenience for reverse REP operations, for
  2902. example.  The resulting offset will be in the range FFF0h - FFFFh, unless the
  2903. address is extremely low in memory, in which case the range may be lower.
  2904.  
  2905.  
  2906.  
  2907.  
  2908. Service : ME_LOWOFS
  2909.  
  2910. Module  : Memory Services
  2911.  
  2912. Compat  : Any
  2913.  
  2914. Purpose : Converts an address to have the highest segment and lowest offset
  2915.  
  2916. Parms:
  2917.    DX:AX <-- segment:offset
  2918.    -------
  2919.    DX:AX = converted segment:offset
  2920.  
  2921. Description:
  2922.  
  2923. The ME_LOWOFS service converts an address so that it has the lowest possible
  2924. offset and highest possible segment.  This allows you to work forwards from
  2925. this address by up to 65,519 bytes without wrapping around within the
  2926. segment, which is a convenience for forward REP operations, for example.  The
  2927. resulting offset will be in the range 0000h - 000Fh.
  2928.  
  2929. Service : ME_MOVE
  2930.  
  2931. Module  : Memory Services
  2932.  
  2933. Compat  : Any
  2934.  
  2935. Purpose : Moves a block of data from one place to another
  2936.  
  2937. Parms:
  2938.    DS:SI <-- source segment:offset
  2939.    ES:DI <-- destination segment:offset
  2940.       CX <-- bytes to move (0 - 65,519)
  2941.  
  2942. Description:
  2943.  
  2944. The ME_MOVE service moves data from one place to another.  It automatically
  2945. handles overlaps, so the data will always be copied correctly.
  2946.  
  2947. The reason ME_MOVE can only handle up to 65,519 characters rather than a full
  2948. 65,535 is because it uses the ME_LOWOFS and ME_HIGHOFS services rather than
  2949. recalculating and re-normalizing the addresses every time.  The loss of a few
  2950. bytes' range is, in most cases, an acceptable price for the vastly increased
  2951. speed.  If you need greater range, calling ME_MOVE more than once may be a
  2952. bit of a nuisance, but it will still be considerably faster than the
  2953. recalculation approach.
  2954.  
  2955. Service : MI_BOOT
  2956.  
  2957. Module  : Miscellaneous Services
  2958.  
  2959. Compat  : Clone
  2960.  
  2961. Purpose : Reboots the computer (warm boot)
  2962.  
  2963. Parms:
  2964.    none
  2965.  
  2966. Description:
  2967.  
  2968. The MI_BOOT service restarts the computer by performing a warm boot.
  2969.  
  2970. I'd provide a "cold boot" service as well, but I've found that doing a cold
  2971. boot is liable to lock up many clones, including some Compaq models.  The
  2972. warm boot, however, has worked on every clone to which I've had access.
  2973.  
  2974. This service may be accessed by JMP instead of CALL if you prefer.  It really
  2975. doesn't matter, since the stack is reset and control is returned to the
  2976. system during the boot process.  The JMP is trivially more efficient, though.
  2977.  
  2978. Service : MI_GETSCREEN
  2979.  
  2980. Module  : Miscellaneous Services
  2981.  
  2982. Compat  : Clone
  2983.  
  2984. Purpose : Gets information about the active video display
  2985.  
  2986. Parms:
  2987.    -------
  2988.       AH = adapter type (1-6: MDA, Herc, CGA, EGA, MCGA, VGA)
  2989.       AL = color flag (0 color, 1 mono)
  2990.  
  2991. Description:
  2992.  
  2993. The MI_GETSCREEN service gets vital information about the active display.  It
  2994. tells you whether the display is capable of handling color and what kind of
  2995. display adapter is in use.
  2996.  
  2997. Note that the color flag will not necessarily be accurate for CGAs.  It is
  2998. possible to connect a monochrome monitor to the CGA, but there is no way for
  2999. the computer to detect whether this has been done, so it is assumed that CGAs
  3000. are always color.  You should add a "/B" command-line option to your program
  3001. so that the user can specify that a monochrome CGA display is in use ("/B" is
  3002. what Microsoft uses to specify "black and white").
  3003.  
  3004. If the adapter is determined to be MDA or Hercules, the interrupt system will
  3005. be turned on and the service will delay for up to 1/9th second as it attempts
  3006. to decide which kind of adapter is in use.  The original interrupt status
  3007. will be restored when the service exits.
  3008.  
  3009. The ASMWIZ text services allow for automatic conversion of colors to their
  3010. monochrome equivalents, making it easy to handle any display.  See the
  3011. BV_FIXCOLOR, DV_FIXCOLOR, or MV_FIXCOLOR service for more information.
  3012.  
  3013. Service : MI_PARSE
  3014.  
  3015. Module  : Miscellaneous Services
  3016.  
  3017. Compat  : DOS
  3018.  
  3019. Purpose : Parses a command line into file specifications and options
  3020.  
  3021. Parms:
  3022.    DS:SI <-- ptr to command line (for COM files, is CS:0080h)
  3023.    ES:DI <-- ptr to filename buffer (recommend 128 bytes)
  3024.    ES:BX <-- ptr to option buffer (recommend 128 bytes)
  3025.       AL <-- switch character (normally "/" for DOS)
  3026.    -------
  3027.       AH = number of options
  3028.       AL = number of filenames
  3029.  
  3030. Description:
  3031.  
  3032. The MI_PARSE routine takes the information passed to your program on the
  3033. command line and parses it into filenames and options.
  3034.  
  3035. The command line is everything that comes after your program name when the
  3036. user types in the name of your program.  It is generally used for passing
  3037. filenames and options to your program.  DOS itself is rather crude about such
  3038. matters and simply passes the original input to your program, after removing
  3039. the name of the program itself and any piping or redirection which may have
  3040. been done.
  3041.  
  3042. This routine assumes that anything which isn't an option is a filename.  Of
  3043. course, this need not be true, but it's a convenient fiction for separating
  3044. the options from the rest of the information.
  3045.  
  3046. Options may be delimited by the character of your choice.  DOS normally uses
  3047. "/" and assumes "\" is used for specifying paths.  Many people prefer the
  3048. *nix convention of "-" for switches and "/" for specifying paths, however, so
  3049. this routine allows for that possibility.  DOS will recognize "/" as being
  3050. the same as "\" in any DOS interrupt that accepts paths, so this works out
  3051. fairly well, since *nix folks are accustomed to using "/" as a path
  3052. delimiter.  It's somewhat appalling that Microsoft/IBM deliberately chose to
  3053. avoid the *nix conventions, but it is certainly handy that DOS will (more or
  3054. less) accept such usage internally, if not at the command level.  Note that
  3055. use of "-" as a switch character means that you will not be able to access
  3056. any files which contain "-" characters in the filename. This is rarely a
  3057. problem, but it can happen.
  3058.  
  3059. The two parameter tables, filenames and options, will consist of strings in
  3060. their original order in the command line.  Each string will be terminated by
  3061. a null character, in keeping with C usage.  The number of strings in each
  3062. parameter table is returned by MI_PARSE in one or another half of the AX
  3063. register, as specified in the "Parms" list, above.
  3064.  
  3065. You will normally specify the offset of the command-line within the PSP for
  3066. this service.  For COM-format files, this is CS:0080h.  For EXE-format files,
  3067. use the initial CS value with the same 0080h offset.  With later DOS
  3068. versions, it is possible to ask DOS to give you the segment of the PSP, but
  3069. since many people only have earlier DOS versions, that is not necessarily a
  3070. good idea.  Stick with the original CS, if you know it, and you'll be fine.
  3071.  
  3072. Service : MI_RANDOM
  3073.  
  3074. Module  : Miscellaneous Services
  3075.  
  3076. Compat  : Any
  3077.  
  3078. Purpose : Generates a pseudo-random number
  3079.  
  3080. Parms:
  3081.       DX <-- range of the desired pseudo-random number (1-4000)
  3082.    -------
  3083.       AX = pseudo-random number (0 to DX - 1)
  3084.  
  3085. Description:
  3086.  
  3087. The MI_RANDOM service generates pseudo-random numbers within a desired range.
  3088.  
  3089. A linear congruential method is used to generate the numbers.  The algorithm
  3090. was derived from the book "How to Solve it by Computer", by R. G. Dromey
  3091. (Prentiss-Hall).
  3092.  
  3093. See also the MI_RANDOMIZE service, which is used to initialize the random
  3094. number generator.
  3095.  
  3096.  
  3097.  
  3098.  
  3099. Service : MI_RANDOMIZE
  3100.  
  3101. Module  : Miscellaneous Services
  3102.  
  3103. Compat  : Any / Clone
  3104.  
  3105. Purpose : Initializes the pseudo-random number generator
  3106.  
  3107. Parms:
  3108.       AX <-- random number seed or 0FFFFh
  3109.  
  3110. Description:
  3111.  
  3112. The MI_RANDOMIZE routine initializes the MI_RANDOM random number generator
  3113. service.  You may specify your own random number seed (in which case this
  3114. routine is compatible with any PC) or use 0FFFFh for the routine to pick its
  3115. own seed (in which case this routine is only compatible with clones).
  3116.  
  3117. If you specify 0FFFFh, the random number seed is read directly from the timer
  3118. chip's countdown tick, giving a quite adequately random initial seed value.
  3119.  
  3120. Specifying your own seed may be done to maximize compatibility with the most
  3121. machines.  In that case, you will probably want to get a seed value from the
  3122. DOS time service, using the seconds value.  Use of the "hundredths of
  3123. seconds" value is not advised, as it is always zero on some machines.
  3124.  
  3125. You might also want to specify your own seed during debugging, to assure you
  3126. of a reproducible set of pseudo-random numbers.  The same stream of numbers
  3127. will always be generated from the same seed value.
  3128.  
  3129. Service : MI_SCANENV
  3130.  
  3131. Module  : Miscellaneous Services
  3132.  
  3133. Compat  : DOS
  3134.  
  3135. Purpose : Scans the DOS environment (or similar table) for a specified string
  3136.  
  3137. Parms:
  3138.    DS:SI <-- ptr to DOS environment
  3139.    ES:DI <-- ptr to string for which to seek
  3140.    -------
  3141.    DS:SI = ptr to parm value (if NC; CY is set if not found)
  3142.  
  3143. Description:
  3144.  
  3145. The MI_SCANENV routine scans the DOS environment for a specified string and
  3146. returns the value of the parameter which matches that string.  If there is no
  3147. matching parameter, the carry flag is set.
  3148.  
  3149. You may also use this routine for scanning your own tables if you format them
  3150. like the DOS environment: each entry of the table is an ASCIIZ string which
  3151. contains a parameter name and parameter value, seperated by an "equals" sign.
  3152. The end of the table is marked by an additional NUL character.  Matching is
  3153. case-sensitive ("comspec" will not match "COMSPEC").
  3154.  
  3155. The segment of the environment is stored at offset 002Ch within the PSP.  For
  3156. COM files, the segment is at CS:[002Ch] (see notes under MI_PARSE).  Since
  3157. parameters in the environment are stored in uppercase, you should make sure
  3158. that the string for which you seek is also capitalized.
  3159.  
  3160. The resulting match, if any, will be pointed to by DS:SI on exit.  It is the
  3161. value of the parameter, not the parameter name, which is returned.
  3162.  
  3163.  
  3164. Example:
  3165.       MOV   DS,DS:[002Ch]       ; assumes CS = DS = ES  (COM file)
  3166.       XOR   SI,SI
  3167.       MOV   DI,OFFSET TOFIND
  3168.       CALL  MI_SCANENV
  3169.       JC    NOTFOUND
  3170.       MOV   DX,SI
  3171.       CALL  DV_STROUT
  3172.       CALL  DV_CRLF
  3173.       (etc)
  3174.    NOTFOUND:
  3175.       (etc)
  3176.    TOFIND  DB "PATH",0
  3177.  
  3178. This example will search the environment for the "PATH" parameter.  If a PATH
  3179. exists, it will be displayed, looking perhaps like "D:\;C:\bin" (without the
  3180. quotes).
  3181.  
  3182. Service : MO_HIDECURSOR
  3183.  
  3184. Module  : Mouse Services
  3185.  
  3186. Compat  : BIOS (Microsoft-type mouse driver)
  3187.  
  3188. Purpose : Hides the mouse cursor
  3189.  
  3190. Parms:
  3191.    none
  3192.  
  3193. Description:
  3194.  
  3195. The MO_HIDECURSOR service hides the mouse cursor.  After using this service,
  3196. the mouse cursor will not be visible, although it will still be there.
  3197.  
  3198. This is a somewhat peculiar service.  If you use it more than once, it will
  3199. take more than one application of MO_SHOWCURSOR before the cursor actually
  3200. reappears.  The mouse driver keeps a "level of invisibility" counter rather
  3201. than simply turning the cursor on and off.
  3202.  
  3203.  
  3204.  
  3205.  
  3206. Service : MO_INIT
  3207.  
  3208. Module  : Mouse Services
  3209.  
  3210. Compat  : BIOS (Microsoft-type mouse driver)
  3211.  
  3212. Purpose : Initialize mouse, if any, and get info about it
  3213.  
  3214. Parms:
  3215.    -------
  3216.       AL = number of buttons (0-3)
  3217.  
  3218. Description:
  3219.  
  3220. The MO_INIT service initializes the mouse driver and returns the number of
  3221. buttons on the mouse.  If no mouse is available, the number of buttons will
  3222. be zero.  Otherwise, you can expect 2-3 buttons.
  3223.  
  3224. The Microsoft mouse is somewhat unusual in that it has only two buttons.
  3225. Most compatible mice have three.  The ASMWIZ mouse services will work with
  3226. either, but will ignore the middle button of three-button mice.
  3227.  
  3228. Service : MO_LOCATE
  3229.  
  3230. Module  : Mouse Services
  3231.  
  3232. Compat  : BIOS (Microsoft-type mouse driver)
  3233.  
  3234. Purpose : Sets the mouse cursor location
  3235.  
  3236. Parms:
  3237.       DH <-- row (1-25)
  3238.       DL <-- column (1-80)
  3239.  
  3240. Description:
  3241.  
  3242. The MO_LOCATE service sets the mouse cursor position.  It works whether or
  3243. not the mouse cursor is visible.
  3244.  
  3245. Normally, the mouse driver uses coordinates based on a 640x200 virtual
  3246. screen.  In order to make it easier to handle the mouse for text, this
  3247. service automatically converts from an 80x25 format.
  3248.  
  3249.  
  3250.  
  3251.  
  3252. Service : MO_RANGE
  3253.  
  3254. Module  : Mouse Services
  3255.  
  3256. Compat  : BIOS (Microsoft-type mouse driver)
  3257.  
  3258. Purpose : Sets the mouse cursor range
  3259.  
  3260. Parms:
  3261.       CH <-- top row (1-25)
  3262.       CL <-- left column (1-80)
  3263.       DH <-- bottom row (1-25)
  3264.       DL <-- right column (1-80)
  3265.  
  3266. Description:
  3267.  
  3268. The MO_RANGE service sets the mouse cursor range.  The mouse cursor will be
  3269. constrained to the specified area of the screen.
  3270.  
  3271. Normally, the mouse driver uses coordinates based on a 640x200 virtual
  3272. screen.  In order to make it easier to handle the mouse for text, this
  3273. service automatically converts from an 80x25 format.
  3274.  
  3275. Service : MO_SHOWCURSOR
  3276.  
  3277. Module  : Mouse Services
  3278.  
  3279. Compat  : BIOS (Microsoft-type mouse driver)
  3280.  
  3281. Purpose : Shows the mouse cursor
  3282.  
  3283. Parms:
  3284.    none
  3285.  
  3286. Description:
  3287.  
  3288. The MO_SHOWCURSOR service shows the mouse cursor.  After using this service,
  3289. the mouse cursor will (probably) be visible.
  3290.  
  3291. See the description of the MO_HIDECURSOR service for details on that
  3292. "probably" caution!
  3293.  
  3294.  
  3295.  
  3296.  
  3297. Service : MO_WHERE
  3298.  
  3299. Module  : Mouse Services
  3300.  
  3301. Compat  : BIOS (Microsoft-type mouse driver)
  3302.  
  3303. Purpose : Gets the mouse cursor location
  3304.  
  3305. Parms:
  3306.    -------
  3307.       AH = right mouse button (0 if not pressed, 1 if pressed)
  3308.       AL = left mouse button  (0 if not pressed, 1 if pressed)
  3309.       DH = row (1-25)
  3310.       DL = column (1-80)
  3311.  
  3312. Description:
  3313.  
  3314. The MO_WHERE service gets the mouse cursor position and current button
  3315. status.  It works whether or not the mouse cursor is visible.
  3316.  
  3317. Normally, the mouse driver uses coordinates based on a 640x200 virtual
  3318. screen.  In order to make it easier to handle the mouse for text, this
  3319. service automatically converts to an 80x25 format.
  3320.  
  3321. Service : MU_SOUND
  3322.  
  3323. Module  : Sound and Music Services
  3324.  
  3325. Compat  : Clone
  3326.  
  3327. Purpose : Produces a sound of the desired frequency and duration
  3328.  
  3329. Parms:
  3330.    AX <-- frequency of the sound, in cycles per second (Hertz)
  3331.    DX <-- duration of the sound (in 1/18th seconds)
  3332.  
  3333. Description:
  3334.  
  3335. The MU_SOUND routine produces a sound of the specified frequency (about
  3336. 50-4000 is useful) and duration (in 18ths of seconds).
  3337.  
  3338. If you are interested in producing music using this service, the following
  3339. table may prove of some use.  You can move down an octave by halving the
  3340. frequency for a given note (which can be efficiently accomplished using the
  3341. SHR or SHift Right assembly-language operation).  About seven octaves are
  3342. available on the usual PC compatible.
  3343.  
  3344. Note     Frequency (highest octave)
  3345. =====    =========
  3346.   A         3520
  3347. A#,B-       3714
  3348.   B         3952
  3349.   C         4186
  3350. C#,D-       4434
  3351.   D         4698
  3352. D#,E-       4978
  3353.   E         5274
  3354.   F         5588
  3355. F#,G-       5920
  3356.   G         6272
  3357. G#,A-       6644
  3358.  
  3359. Service : MV_CHROUT
  3360.  
  3361. Module  : Machine-level Video Services
  3362.  
  3363. Compat  : Clone
  3364.  
  3365. Purpose : Displays a character on the screen
  3366.  
  3367. Parms:
  3368.       AL <-- character to display
  3369.  
  3370. Description:
  3371.  
  3372. The MV_CHROUT routine displays a character on the screen.  The screen must be
  3373. in one of the text modes (video modes 0-3, 7).
  3374.  
  3375. The following control codes are interpreted:
  3376.    7      Bell             beep
  3377.    8      Backspace        non-destructive backspace
  3378.    9      Tab              space over to the next tab stop
  3379.   10      Linefeed         move cursor down one line, scrolling as needed
  3380.   12      Formfeed         clear screen and home cursor
  3381.   13      Carriage Return  home cursor on current line
  3382.  
  3383. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  3384. keep the output from this service in a window.
  3385.  
  3386.  
  3387.  
  3388.  
  3389. Service : MV_CLEOLN
  3390.  
  3391. Module  : Machine-level Video Services
  3392.  
  3393. Compat  : Clone
  3394.  
  3395. Purpose : Clears to the end of the line
  3396.  
  3397. Parms:
  3398.    none
  3399.  
  3400. Description:
  3401.  
  3402. The MV_CLEOLN service clears from the current cursor position to the end of
  3403. the current screen line, inclusive.  The screen must be in one of the text
  3404. modes (video modes 0-3, 7).
  3405.  
  3406. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  3407. keep the output from this service in a window.
  3408.  
  3409. Service : MV_CLS
  3410.  
  3411. Module  : Machine-level Video Services
  3412.  
  3413. Compat  : Clone
  3414.  
  3415. Purpose : Clears the screen
  3416.  
  3417. Parms:
  3418.    none
  3419.  
  3420. Description:
  3421.  
  3422. The MV_CLS service clears the screen and homes the cursor to the upper left
  3423. corner.  The screen must be in one of the text modes (video modes 0-3, 7).
  3424.  
  3425. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  3426. keep the output from this service in a window.
  3427.  
  3428.  
  3429.  
  3430.  
  3431. Service : MV_COLOR
  3432.  
  3433. Module  : Machine-level Video Services
  3434.  
  3435. Compat  : Clone
  3436.  
  3437. Purpose : Sets the default text color
  3438.  
  3439. Parms:
  3440.       AL <-- default color
  3441.  
  3442. Description:
  3443.  
  3444. The MV_COLOR service sets the default text color.  A color/attribute table is
  3445. given in the ASMWIZ.DOC file.  In general, however, the background is in the
  3446. high nybble and ranges 0-7; the foreground is in the low nybble and also
  3447. ranges 0-7.  For bright, add 8 to the foreground; for blinking, add 8 to the
  3448. background.
  3449.  
  3450. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  3451. keep the output from this service in a window.
  3452.  
  3453. Service : MV_CRLF
  3454.  
  3455. Module  : Machine-level Video Services
  3456.  
  3457. Compat  : Clone
  3458.  
  3459. Purpose : Displays a <CR><LF> (carriage return and linefeed)
  3460.  
  3461. Parms:
  3462.    none
  3463.  
  3464. Description:
  3465.  
  3466. The MV_CRLF routine displays a carriage return and linefeed on the screen.
  3467. The screen must be in one of the text modes (video modes 0-3, 7).
  3468.  
  3469. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  3470. keep the output from this service in a window.
  3471.  
  3472.  
  3473.  
  3474.  
  3475. Service : MV_DELCHR
  3476.  
  3477. Module  : Machine-level Video Services
  3478.  
  3479. Compat  : Clone
  3480.  
  3481. Purpose : Deletes the character at the cursor
  3482.  
  3483. Parms:
  3484.    none
  3485.  
  3486. Description:
  3487.  
  3488. The MV_DELCHR service deletes the character on which the cursor is placed.
  3489. Any characters to the right of it are moved left and the rightmost column of
  3490. the screen is cleared to a space in the current screen colors.
  3491.  
  3492. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  3493. keep the output from this service in a window.
  3494.  
  3495. Service : MV_DELLINE
  3496.  
  3497. Module  : Machine-level Video Services
  3498.  
  3499. Compat  : Clone
  3500.  
  3501. Purpose : Deletes the current screen row
  3502.  
  3503. Parms:
  3504.    none
  3505.  
  3506. Description:
  3507.  
  3508. The MV_DELLINE service deletes the row on which the cursor is placed.  Any
  3509. rows beneath it are moved up and the bottom line of the screen is cleared to
  3510. a row of spaces in the current screen colors.
  3511.  
  3512. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  3513. keep the output from this service in a window.
  3514.  
  3515. Service : MV_FIXCOLOR
  3516.  
  3517. Module  : Machine-level Video Services
  3518.  
  3519. Compat  : Any
  3520.  
  3521. Purpose : Tells the MV services whether to convert colors to monochrome
  3522.  
  3523. Parms:
  3524.       AL <-- whether to convert to mono (0 no, 1 yes)
  3525.  
  3526. Description:
  3527.  
  3528. The MV_FIXCOLOR service tells the Machine-level Video services whether to
  3529. convert colors to their monochrome equivalents.  If not, the colors will
  3530. remain as you originally specified.  If so, the colors will be converted to
  3531. appropriate values for use on a monochrome display.
  3532.  
  3533. The color-to-mono translation attempts to mimic the original display as
  3534. closely as possible.  It analyzes the foreground and background colors by
  3535. their intensity.  The results are translated to white on black, bright white
  3536. on black, or black on white.  The "blink" attribute is preserved.  If the
  3537. original foreground was identical to the background (invisible characters),
  3538. the result will be black on black.
  3539.  
  3540. See also the MI_GETSCREEN service, which allows you to automatically detect
  3541. what kind of display is in use.
  3542.  
  3543. Service : MV_FRAME
  3544.  
  3545. Module  : Machine-level Video Services
  3546.  
  3547. Compat  : Clone
  3548.  
  3549. Purpose : Displays a window frame
  3550.  
  3551. Parms:
  3552.    CH,CL <-- upper left corner (row 1-25/43, column 1-40/80)
  3553.    DH,DL <-- lower right corner (row 1-25/43, column 1-40/80)
  3554.    DS:SI <-- frame pointer (SI = -1 to -9 for built-in frame types)
  3555.  
  3556. Description:
  3557.  
  3558. The MV_FRAME service displays a window frame.  You may design your own frame
  3559. or use one of a variety of built-in frames.
  3560.  
  3561. If you choose to build your own frame, you must point DS:SI to an eight-byte
  3562. list of characters with which to build the frame.  The list should be in this
  3563. order: top left corner, top middle, top right corner, left middle, right
  3564. middle, lower left corner, lower middle, and lower right corner.
  3565.  
  3566. You may also choose to use a built-in frame by setting SI in the range -1 to
  3567. -9, as follows:
  3568.  
  3569.    -1      single line frame
  3570.    -2      double line frame
  3571.    -3      single horizontal lines, double vertical lines
  3572.    -4      double horizontal lines, single vertical lines
  3573.    -5      blank block frame              (CHR$(32))
  3574.    -6      low intensity block frame      (CHR$(176))
  3575.    -7      medium intensity block frame   (CHR$(177))
  3576.    -8      high intensity block frame     (CHR$(178))
  3577.    -9      solid block frame              (CHR$(219))
  3578.  
  3579. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  3580. keep the output from this service in a window.
  3581.  
  3582. Service : MV_GETCOLOR
  3583.  
  3584. Module  : Machine-level Video Services
  3585.  
  3586. Compat  : Clone
  3587.  
  3588. Purpose : Gets the default text color
  3589.  
  3590. Parms:
  3591.    -------
  3592.       AL = default color
  3593.  
  3594. Description:
  3595.  
  3596. The MV_GETCOLOR service gets the default text color.  A color/attribute table
  3597. is given in the ASMWIZ.DOC file.  In general, however, the background is in
  3598. the high nybble and ranges 0-7; the foreground is in the low nybble and also
  3599. ranges 0-7.
  3600.  
  3601. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  3602. keep the output from this service in a window.
  3603.  
  3604.  
  3605.  
  3606.  
  3607. Service : MV_MODE
  3608.  
  3609. Module  : Machine-level Video Services
  3610.  
  3611. Compat  : Clone
  3612.  
  3613. Purpose : Gets the default screen mode
  3614.  
  3615. Parms:
  3616.    -------
  3617.       AL = mode
  3618.  
  3619. Description:
  3620.  
  3621. The MV_GETMODE service gets the current screen mode.  A table of screen modes
  3622. is given in the ASMWIZ.DOC file.
  3623.  
  3624. Service : MV_HIDECURSOR
  3625.  
  3626. Module  : Machine-level Video Services
  3627.  
  3628. Compat  : Clone
  3629.  
  3630. Purpose : Hides the cursor
  3631.  
  3632. Parms:
  3633.    none
  3634.  
  3635. Description:
  3636.  
  3637. The MV_HIDECURSOR service hides the cursor, making it invisible.  This does
  3638. not affect normal cursor operation.
  3639.  
  3640. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  3641. keep the output from this service in a window.
  3642.  
  3643.  
  3644.  
  3645.  
  3646. Service : MV_INIT
  3647.  
  3648. Module  : Machine-level Video Services
  3649.  
  3650. Compat  : Clone
  3651.  
  3652. Purpose : Initializes the Machine-level Video Services
  3653.  
  3654. Parms:
  3655.    none
  3656.  
  3657. Description:
  3658.  
  3659. The MV_INIT routine initializes the Machine-level Graphics Services.  It
  3660. should be used once in your program, before any other Machine-level Graphics
  3661. Services are called.
  3662.  
  3663. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  3664. keep the output from this service in a window.
  3665.  
  3666. Service : MV_INSCHR
  3667.  
  3668. Module  : Machine-level Video Services
  3669.  
  3670. Compat  : Clone
  3671.  
  3672. Purpose : Inserts a space at the cursor position
  3673.  
  3674. Parms:
  3675.    none
  3676.  
  3677. Description:
  3678.  
  3679. The MV_INSCHR service inserts a space at the current cursor location.  Any
  3680. characters to the right of it are moved right and a space is inserted in the
  3681. current screen colors.
  3682.  
  3683. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  3684. keep the output from this service in a window.
  3685.  
  3686.  
  3687.  
  3688.  
  3689. Service : MV_INSLINE
  3690.  
  3691. Module  : Machine-level Video Services
  3692.  
  3693. Compat  : Clone
  3694.  
  3695. Purpose : Inserts a line at the current screen row
  3696.  
  3697. Parms:
  3698.    none
  3699.  
  3700. Description:
  3701.  
  3702. The MV_INSLINE service inserts a row at the current cursor location.  Any
  3703. rows beneath it are moved down and the new line screen is cleared to a row of
  3704. spaces in the current screen colors.
  3705.  
  3706. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  3707. keep the output from this service in a window.
  3708.  
  3709. Service : MV_LOCATE
  3710.  
  3711. Module  : Machine-level Video Services
  3712.  
  3713. Compat  : Clone
  3714.  
  3715. Purpose : Sets the cursor position
  3716.  
  3717. Parms:
  3718.       DH <-- row (1-25)
  3719.       DL <-- column (1-40/80)
  3720.  
  3721. Description:
  3722.  
  3723. The MV_LOCATE service sets the cursor position.  The screen must be in one of
  3724. the text modes (video modes 0-3, 7).
  3725.  
  3726. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  3727. keep the output from this service in a window.
  3728.  
  3729.  
  3730.  
  3731.  
  3732. Service : MV_MODE
  3733.  
  3734. Module  : Machine-level Video Services
  3735.  
  3736. Compat  : Clone
  3737.  
  3738. Purpose : Sets the screen mode
  3739.  
  3740. Parms:
  3741.       AL <-- screen mode (0-3, 7)
  3742.  
  3743. Description:
  3744.  
  3745. The MV_MODE routine sets the screen mode.  This may be any of the following:
  3746.  
  3747.      Mode  Resolu.  Type  Colr  Use        Adapter(s)
  3748.  
  3749.        0   40x25    b&w     16  text       CGA, EGA, VGA
  3750.        1   40x25    color   16  text       CGA, EGA, VGA
  3751.        2   80x25    b&w     16  text       CGA, EGA, VGA
  3752.        3   80x25    color   16  text       CGA, EGA, VGA
  3753.        7   80x25    b&w      -  text       MDA, EGA, VGA
  3754.  
  3755. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  3756. keep the output from this service in a window.
  3757.  
  3758. Service : MV_POPUP
  3759.  
  3760. Module  : Machine-level Video Services
  3761.  
  3762. Compat  : Clone
  3763.  
  3764. Purpose : Displays a pop-up window on the screen
  3765.  
  3766. Parms:
  3767.    DS:DX <-- pointer to parameter list
  3768.  
  3769. Description:
  3770.  
  3771. The MV_POPUP service displays a pop-up window on the screen.  A variety of
  3772. frames is available for the window.  Titles are optional and will be left-
  3773. justified in the top bar of the window if supplied.
  3774.  
  3775. Frame types are as follows:
  3776.  
  3777.    0    none (blank)
  3778.    1    single lines
  3779.    2    double lines
  3780.    3    single horizontal lines, double vertical lines
  3781.    4    double horizontal lines, single vertical lines
  3782.  
  3783. The parameter list should look like this:
  3784.  
  3785. Y1           db ?            ; top row of window
  3786. X1           db ?            ; left column of window
  3787. Y2           db ?            ; bottom row of window
  3788. X2           db ?            ; right column of window
  3789. FRAMETYPE    db ?            ; frame type
  3790. FRAMECOLOR   db ?            ; frame color
  3791. TITLE        dw ?            ; offset (from DS:) of ASCIIZ title
  3792.                              ; use 0FFFFh instead if no title is desired
  3793.  
  3794. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  3795. keep the output from this service in a window.
  3796.  
  3797. Service : MV_SAVESIZE
  3798.  
  3799. Module  : Machine-level Video Services
  3800.  
  3801. Compat  : Any
  3802.  
  3803. Purpose : Gets the number of bytes needed to save a screen area
  3804.  
  3805. Parms:
  3806.    -------
  3807.       AX = bytes
  3808.  
  3809. Description:
  3810.  
  3811. The MV_SAVESIZE service tells you how many bytes will be needed to save an
  3812. area of the screen with MV_SCRSAVE.  This is intended as a convenience for
  3813. programs that allocate the required space on the fly.  The actual calculation
  3814. looks like this:
  3815.  
  3816.    Bytes = (RowsToSave * ScreenColumns + ColumnsToSave + 1) * 2
  3817.  
  3818. You will need 4,002 bytes to save an entire 80x25 screen.
  3819.  
  3820. Service : MV_SCRREST
  3821.  
  3822. Module  : Machine-level Video Services
  3823.  
  3824. Compat  : Clone
  3825.  
  3826. Purpose : Restores a saved area of the screen
  3827.  
  3828. Parms:
  3829.    DS:SI <-- pointer to a buffer containing a saved screen area
  3830.       DH <-- top row      (where to restore to)
  3831.       DL <-- left column  (where to restore to)
  3832.  
  3833. Description:
  3834.  
  3835. The MV_SCRREST service restores a saved area of the screen to the display.
  3836. The image may be stored to any location, regardless of where it was saved
  3837. from, as long as the results don't go off the edge of the screen.
  3838.  
  3839. Only the upper left corner of the location to which to restore is specified.
  3840. This service calculates the lower left corner from size parameters which are
  3841. stored in the saved screen image.
  3842.  
  3843. Text mode (modes 0-3, 7) is required.  Only display page zero is supported.
  3844.  
  3845. Service : MV_SCRSAVE
  3846.  
  3847. Module  : Machine-level Video Services
  3848.  
  3849. Compat  : Clone
  3850.  
  3851. Purpose : Saves an area of the screen to a buffer
  3852.  
  3853. Parms:
  3854.    ES:DI <-- pointer to a buffer to which to save the screen area
  3855.       CH <-- top row
  3856.       CL <-- left column
  3857.       DH <-- bottom row
  3858.       DL <-- right column
  3859.    -------
  3860.       AX = bytes used to store the image
  3861.  
  3862. Description:
  3863.  
  3864. The MV_SCRSAVE service saves an area of the screen to a buffer.  The number
  3865. of bytes used to store the image is returned.  You can find out the number of
  3866. bytes that will be needed in advance, if desired, via the MV_SAVESIZE service.
  3867.  
  3868. The saved image will be a direct copy of the specified area of the screen.
  3869. The first two bytes of the image will contain the number of rows and columns
  3870. in the image, respectively.
  3871.  
  3872. Text mode (modes 0-3, 7) is required.  Only display page zero is supported.
  3873.  
  3874. Service : MV_SHOWCURSOR
  3875.  
  3876. Module  : Machine-level Video Services
  3877.  
  3878. Compat  : Clone
  3879.  
  3880. Purpose : Shows the cursor
  3881.  
  3882. Parms:
  3883.    none
  3884.  
  3885. Description:
  3886.  
  3887. The MV_SHOWCURSOR service shows the cursor, making it visible.  NOTE: This
  3888. service may change the cursor shape if used before MV_HIDECURSOR.
  3889.  
  3890. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  3891. keep the output from this service in a window.
  3892.  
  3893.  
  3894.  
  3895.  
  3896. Service : MV_STROUT
  3897.  
  3898. Module  : Machine-level Video Services
  3899.  
  3900. Compat  : Clone
  3901.  
  3902. Purpose : Displays a string on the screen
  3903.  
  3904. Parms:
  3905.    DS:DX <-- ptr to the string to display
  3906.  
  3907. Description:
  3908.  
  3909. The MV_STROUT routine displays a string on the screen.  The string must be in
  3910. ASCIIZ (NUL terminated) format.  The screen must be in one of the text modes
  3911. (video modes 0-3, 7).
  3912.  
  3913. The following control codes are interpreted:
  3914.    7      Bell             beep
  3915.    8      Backspace        non-destructive backspace
  3916.    9      Tab              space over to the next tab stop
  3917.   10      Linefeed         move cursor down one line, scrolling as needed
  3918.   12      Formfeed         clear screen and home cursor
  3919.   13      Carriage Return  home cursor on current line
  3920.  
  3921. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  3922. keep the output from this service in a window.
  3923.  
  3924. Service : MV_WHERE
  3925.  
  3926. Module  : Machine-level Video Services
  3927.  
  3928. Compat  : Clone
  3929.  
  3930. Purpose : Gets the cursor position
  3931.  
  3932. Parms:
  3933.    -------
  3934.       DH = row (1-25)
  3935.       DL = column (1-40/80)
  3936.  
  3937. Description:
  3938.  
  3939. The MV_WHERE service gets the cursor position.  The screen must be in one of
  3940. the text modes (video modes 0-3, 7).
  3941.  
  3942. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  3943. keep the output from this service in a window.
  3944.  
  3945. Service : S0_COMPARE
  3946.  
  3947. Module  : String Services
  3948.  
  3949. Compat  : Any
  3950.  
  3951. Purpose : Compares two strings
  3952.  
  3953. Parms:
  3954.    DS:SI <-- ptr to first string
  3955.    ES:DI <-- ptr to second string
  3956.    -------
  3957.    Flags = ZF if equal, NZ if not equal
  3958.    Flags = CY if first < second, NC if first >= second
  3959.  
  3960. Description:
  3961.  
  3962. The S0_COMPARE service compares two strings.  The carry flag and zero flag
  3963. are set as you might expect for a comparison operation.
  3964.  
  3965. Strings must be in ASCIIZ form (NUL terminated).
  3966.  
  3967.  
  3968.  
  3969.  
  3970. Service : S0_DUPE
  3971.  
  3972. Module  : String Services
  3973.  
  3974. Compat  : Any
  3975.  
  3976. Purpose : Creates a string by duplicating a specified character
  3977.  
  3978. Parms:
  3979.       AL <-- character to duplicate
  3980.       CX <-- number of times to repeat the character
  3981.    ES:DI <-- ptr to result string
  3982.  
  3983. Description:
  3984.  
  3985. The S0_DUPE service creates a string by repeating a single character.  The
  3986. resulting string will be in ASCIIZ form (NUL terminated), so be sure to use a
  3987. buffer large enough to hold both the string and its terminator.
  3988.  
  3989. Service : S0_LEFT
  3990.  
  3991. Module  : String Services
  3992.  
  3993. Compat  : Any
  3994.  
  3995. Purpose : Copies a section from the left of a string
  3996.  
  3997. Parms:
  3998.       CX <-- number of characters to copy
  3999.    DS:SI <-- ptr to source string
  4000.    ES:DI <-- ptr to result string
  4001.  
  4002. Description:
  4003.  
  4004. The S0_LEFT service copies a specified number of characters from the left of
  4005. one string into another.  If you prefer, you can use the same address for
  4006. both strings, allowing you to place the result back into the source buffer.
  4007.  
  4008. Strings must be in ASCIIZ form (NUL terminated).
  4009.  
  4010.  
  4011.  
  4012.  
  4013. Service : S0_LENGTH
  4014.  
  4015. Module  : String Services
  4016.  
  4017. Compat  : Any
  4018.  
  4019. Purpose : Returns the length of a string
  4020.  
  4021. Parms:
  4022.    DS:SI <-- ptr to source string
  4023.    -------
  4024.       CX = string length
  4025.  
  4026. Description:
  4027.  
  4028. The S0_LENGTH service returns the length of a string, not counting the NUL
  4029. terminator.
  4030.  
  4031. Strings must be in ASCIIZ form (NUL terminated).
  4032.  
  4033. Service : S0_LOCASE
  4034.  
  4035. Module  : String Services
  4036.  
  4037. Compat  : Any
  4038.  
  4039. Purpose : Converts a string to lowercase
  4040.  
  4041. Parms:
  4042.    DS:SI <-- ptr to source string
  4043.    ES:DI <-- ptr to result string
  4044.  
  4045. Description:
  4046.  
  4047. The S0_LOCASE service converts all of the alphabetic characters in a string
  4048. to lowercase.  As well as American alphabet characters, the international
  4049. alphabet characters supplied in the upper 128 IBM ASCII set are also
  4050. translated.
  4051.  
  4052. If you prefer, you can use the same address for both strings, allowing you to
  4053. place the result back into the source buffer.
  4054.  
  4055. Strings must be in ASCIIZ form (NUL terminated).
  4056.  
  4057.  
  4058.  
  4059.  
  4060. Service : S0_MID
  4061.  
  4062. Module  : String Services
  4063.  
  4064. Compat  : Any
  4065.  
  4066. Purpose : Copies a section of one string to another
  4067.  
  4068. Parms:
  4069.       CX <-- number of characters to copy
  4070.       DX <-- where to start copying from (1-x)
  4071.    DS:SI <-- ptr to source string
  4072.    ES:DI <-- ptr to result string
  4073.  
  4074. Description:
  4075.  
  4076. The S0_MID service copies a specified number of characters one string to
  4077. another, starting from a given location.  If you prefer, you can use the same
  4078. address for both strings, allowing you to place the result back into the
  4079. source buffer.
  4080.  
  4081. Strings must be in ASCIIZ form (NUL terminated).
  4082.  
  4083. Service : S0_RIGHT
  4084.  
  4085. Module  : String Services
  4086.  
  4087. Compat  : Any
  4088.  
  4089. Purpose : Copies a section from the right of a string
  4090.  
  4091. Parms:
  4092.       CX <-- number of characters to copy
  4093.    DS:SI <-- ptr to source string
  4094.    ES:DI <-- ptr to result string
  4095.  
  4096. Description:
  4097.  
  4098. The S0_RIGHT service copies a specified number of characters from the right
  4099. of one string into another.  If you prefer, you can use the same address for
  4100. both strings, allowing you to place the result back into the source buffer.
  4101.  
  4102. Strings must be in ASCIIZ form (NUL terminated).
  4103.  
  4104.  
  4105.  
  4106.  
  4107. Service : S0_TRIM
  4108.  
  4109. Module  : String Services
  4110.  
  4111. Compat  : Any
  4112.  
  4113. Purpose : Trims the white space from either side of a string
  4114.  
  4115. Parms:
  4116.       AL <-- trim code: set bit 0 for left, bit 1 for right
  4117.    DS:SI <-- ptr to source string
  4118.    ES:DI <-- ptr to result string
  4119.  
  4120. Description:
  4121.  
  4122. The S0_TRIM service removes the "white space" from either side (or both
  4123. sides) of a string.  Blanks and control characters are considered white
  4124. space.  This is a handy routine for normalizing user input and trimming the
  4125. padding from fixed-length records, for instance.
  4126.  
  4127. If you prefer, you can use the same address for both strings, allowing you to
  4128. place the result back into the source buffer.
  4129.  
  4130. Strings must be in ASCIIZ form (NUL terminated).
  4131.  
  4132. Service : S0_UPCASE
  4133.  
  4134. Module  : String Services
  4135.  
  4136. Compat  : Any
  4137.  
  4138. Purpose : Converts a string to uppercase
  4139.  
  4140. Parms:
  4141.    DS:SI <-- ptr to source string
  4142.    ES:DI <-- ptr to result string
  4143.  
  4144. Description:
  4145.  
  4146. The S0_UPCASE service converts all of the alphabetic characters in a string
  4147. to uppercase.  As well as American alphabet characters, the international
  4148. alphabet characters supplied in the upper 128 IBM ASCII set are also
  4149. translated.
  4150.  
  4151. If you prefer, you can use the same address for both strings, allowing you to
  4152. place the result back into the source buffer.
  4153.  
  4154. Strings must be in ASCIIZ form (NUL terminated).
  4155.  
  4156. Service : TC_CHKSUM
  4157.  
  4158. Module  : Telecommunications Services
  4159.  
  4160. Compat  : Any
  4161.  
  4162. Purpose : Calculates a checksum for Xmodem or Ymodem
  4163.  
  4164. Parms:
  4165.    DS:SI <-- ptr to data block
  4166.       CX <-- length of data block (bytes)
  4167.    -------
  4168.       AX = checksum
  4169.  
  4170. Description:
  4171.  
  4172. The TC_CHKSUM routine calculates the checksum of a block of data.  The
  4173. algorithm used is compatible with the Xmodem and Ymodem file transfer
  4174. protocols (use the lower byte of the checksum, AL, in that case).
  4175.  
  4176.  
  4177.  
  4178.  
  4179. Service : TC_CRC
  4180.  
  4181. Module  : Telecommunications Services
  4182.  
  4183. Compat  : Any
  4184.  
  4185. Purpose : Calculates a CRC for Xmodem or Ymodem
  4186.  
  4187. Parms:
  4188.    DS:SI <-- ptr to data block
  4189.       CX <-- length of data block (bytes)
  4190.    -------
  4191.       AX = CRC
  4192.  
  4193. Description:
  4194.  
  4195. The TC_CRC routine calculates the CRC (Cyclical Redundancy Check) value of a
  4196. block of data.  The algorithm used is compatible with the Xmodem and Ymodem
  4197. file transfer protocols.
  4198.  
  4199. If you use TC_CRC for an outgoing Xmodem/Ymodem block, you need to add two
  4200. nulls to the end of the block and increment CX accordingly.  When you get the
  4201. CRC, exchange AL and AH, then put AX where the nulls were, which will
  4202. complete the outgoing packet.  The reason for the swap is that Xmodem/Ymodem
  4203. expect the CRC with the high byte followed by the low byte (non-Intel format).
  4204.  
  4205. If you use TC_CRC for an incoming Xmodem/Ymodem block, leave the received CRC
  4206. at the end of the data block and increment CX accordingly.  If the calculated
  4207. CRC comes out to zero, the received packet is fine.
  4208.  
  4209. Service : TD_GETDATE
  4210.  
  4211. Module  : Time and Date Services
  4212.  
  4213. Compat  : DOS
  4214.  
  4215. Purpose : Returns the date as a formatted string
  4216.  
  4217. Parms:
  4218.       AL <-- 0 for 2-digit year, 1 for 4-digit year
  4219.    DS:DX <-- ptr to result buffer (minimum 11 bytes)
  4220.  
  4221. Description:
  4222.  
  4223. The TD_GETDATE service returns the current date as a formatted string.  The
  4224. formatting includes international date handling, in that the string is
  4225. formatted in the appropriate manner for the country in which the computer is
  4226. being operated.  If a DOS version before 3.0 is used, the date delimiters are
  4227. not guaranteed to be correct, but the month, day and year will be in the
  4228. proper order regardless.
  4229.  
  4230. The result is returned as an ASCIIZ (NUL terminated) string.
  4231.  
  4232.  
  4233.  
  4234.  
  4235. Service : TD_GETTIME
  4236.  
  4237. Module  : Time and Date Services
  4238.  
  4239. Compat  : DOS
  4240.  
  4241. Purpose : Returns the time as a formatted string
  4242.  
  4243. Parms:
  4244.    DS:DX <-- ptr to result buffer (minimum 8 bytes)
  4245.  
  4246. Description:
  4247.  
  4248. The TD_GETTIME service returns the current time as a formatted string.  The
  4249. formatting includes international time handling, in that the string is
  4250. formatted in the appropriate manner for the country in which the computer is
  4251. being operated.  If a DOS version before 3.0 is used, the time delimiters and
  4252. 12/24-hour formatting are not guaranteed to be correct.
  4253.  
  4254. If the hour is a single-digit number, it will be preceeded by a space.  This
  4255. is handy for keeping times in columns, but if you don't want the space there,
  4256. chop it off by calling the S0_TRIM service.
  4257.  
  4258. The result is returned as an ASCIIZ (NUL terminated) string.
  4259.